mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 18:46:41 +07:00
powerpc/p1022ds: add missing iounmap calls to platform file
The platform file for the Freecale P1022DS reference board is not freeing the ioremap() mapping of the PIXIS and global utilities nodes it creates. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
c0f589502e
commit
316559588f
@ -129,6 +129,7 @@ static void p1022ds_set_gamma_table(int monitor_port, char *gamma_table_base)
|
||||
static void p1022ds_set_monitor_port(int monitor_port)
|
||||
{
|
||||
struct device_node *pixis_node;
|
||||
void __iomem *pixis;
|
||||
u8 __iomem *brdcfg1;
|
||||
|
||||
pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
|
||||
@ -137,12 +138,12 @@ static void p1022ds_set_monitor_port(int monitor_port)
|
||||
return;
|
||||
}
|
||||
|
||||
brdcfg1 = of_iomap(pixis_node, 0);
|
||||
if (!brdcfg1) {
|
||||
pixis = of_iomap(pixis_node, 0);
|
||||
if (!pixis) {
|
||||
pr_err("p1022ds: could not map ngPIXIS registers\n");
|
||||
return;
|
||||
}
|
||||
brdcfg1 += 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */
|
||||
brdcfg1 = pixis + 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */
|
||||
|
||||
switch (monitor_port) {
|
||||
case 0: /* DVI */
|
||||
@ -158,6 +159,8 @@ static void p1022ds_set_monitor_port(int monitor_port)
|
||||
default:
|
||||
pr_err("p1022ds: unsupported monitor port %i\n", monitor_port);
|
||||
}
|
||||
|
||||
iounmap(pixis);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -201,6 +204,8 @@ void p1022ds_set_pixel_clock(unsigned int pixclock)
|
||||
|
||||
/* Enable the clock and set the pxclk */
|
||||
setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16));
|
||||
|
||||
iounmap(guts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user