m68knommu: qspi declutter.
Move the check for the QSPI config option inside the function body. If the option is not enabled, the compiler will optimize away the empty function body so we can remove the other check for the config option. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
Родитель
e93e91f225
Коммит
151d14f4ac
|
@ -118,10 +118,9 @@ static void __init m520x_clk_init(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m520x_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
u16 par;
|
||||
/* setup Port QS for QSPI with gpio CS control */
|
||||
writeb(0x3f, MCF_GPIO_PAR_QSPI);
|
||||
|
@ -129,9 +128,8 @@ static void __init m520x_qspi_init(void)
|
|||
par = readw(MCF_GPIO_PAR_UART);
|
||||
par &= 0x00ff;
|
||||
writew(par, MCF_GPIO_PAR_UART);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -176,9 +174,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
m520x_clk_init();
|
||||
m520x_uarts_init();
|
||||
m520x_fec_init();
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m520x_qspi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -52,10 +52,9 @@ struct clk *mcf_clks[] = {
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m523x_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
u16 par;
|
||||
|
||||
/* setup QSPS pins for QSPI with gpio CS control */
|
||||
|
@ -64,9 +63,8 @@ static void __init m523x_qspi_init(void)
|
|||
par = readw(MCFGPIO_PAR_TIMER);
|
||||
par &= 0x3f3f;
|
||||
writew(par, MCFGPIO_PAR_TIMER);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -82,9 +80,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
{
|
||||
mach_sched_init = hw_timer_init;
|
||||
m523x_fec_init();
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m523x_qspi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -73,17 +73,15 @@ static struct platform_device *m5249_devices[] __initdata = {
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m5249_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
/* QSPI irq setup */
|
||||
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI0,
|
||||
MCFSIM_QSPIICR);
|
||||
mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -112,9 +110,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
#ifdef CONFIG_M5249C3
|
||||
m5249_smc91x_init();
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m5249_qspi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -55,10 +55,9 @@ struct clk *mcf_clks[] = {
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m527x_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
#if defined(CONFIG_M5271)
|
||||
u16 par;
|
||||
|
||||
|
@ -72,9 +71,8 @@ static void __init m527x_qspi_init(void)
|
|||
/* setup QSPS pins for QSPI with gpio CS control */
|
||||
writew(0x003e, MCFGPIO_PAR_QSPI);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -122,9 +120,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
mach_sched_init = hw_timer_init;
|
||||
m527x_uarts_init();
|
||||
m527x_fec_init();
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m527x_qspi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -54,15 +54,13 @@ struct clk *mcf_clks[] = {
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m528x_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
/* setup Port QS for QSPI with gpio CS control */
|
||||
__raw_writeb(0x07, MCFGPIO_PQSPAR);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -128,9 +126,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
mach_sched_init = hw_timer_init;
|
||||
m528x_uarts_init();
|
||||
m528x_fec_init();
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m528x_qspi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -166,15 +166,13 @@ static void __init m53xx_clk_init(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
|
||||
static void __init m53xx_qspi_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
/* setup QSPS pins for QSPI with gpio CS control */
|
||||
writew(0x01f0, MCFGPIO_PAR_QSPI);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
@ -219,9 +217,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
m53xx_clk_init();
|
||||
m53xx_uarts_init();
|
||||
m53xx_fec_init();
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
m53xx_qspi_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BDM_DISABLE
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче