aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/platform/coldfire/m520x.c
diff options
context:
space:
mode:
authorSteven King <sfking@fdwdc.com>2014-05-14 13:07:55 -0400
committerGreg Ungerer <gerg@uclinux.org>2014-05-25 23:28:37 -0400
commit151d14f4ac5a02cc059cb05b2a2f27ec5b9d6831 (patch)
tree07b6a7e045ccef506f6034677aeecb23eb28a88f /arch/m68k/platform/coldfire/m520x.c
parente93e91f2255fce33727d5f618cb16885fd157291 (diff)
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>
Diffstat (limited to 'arch/m68k/platform/coldfire/m520x.c')
-rw-r--r--arch/m68k/platform/coldfire/m520x.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/m68k/platform/coldfire/m520x.c b/arch/m68k/platform/coldfire/m520x.c
index ea1be0e98ad6..4040a3c93733 100644
--- a/arch/m68k/platform/coldfire/m520x.c
+++ b/arch/m68k/platform/coldfire/m520x.c
@@ -118,10 +118,9 @@ static void __init m520x_clk_init(void)
118 118
119/***************************************************************************/ 119/***************************************************************************/
120 120
121#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
122
123static void __init m520x_qspi_init(void) 121static void __init m520x_qspi_init(void)
124{ 122{
123#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
125 u16 par; 124 u16 par;
126 /* setup Port QS for QSPI with gpio CS control */ 125 /* setup Port QS for QSPI with gpio CS control */
127 writeb(0x3f, MCF_GPIO_PAR_QSPI); 126 writeb(0x3f, MCF_GPIO_PAR_QSPI);
@@ -129,9 +128,8 @@ static void __init m520x_qspi_init(void)
129 par = readw(MCF_GPIO_PAR_UART); 128 par = readw(MCF_GPIO_PAR_UART);
130 par &= 0x00ff; 129 par &= 0x00ff;
131 writew(par, MCF_GPIO_PAR_UART); 130 writew(par, MCF_GPIO_PAR_UART);
132}
133
134#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ 131#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
132}
135 133
136/***************************************************************************/ 134/***************************************************************************/
137 135
@@ -176,9 +174,7 @@ void __init config_BSP(char *commandp, int size)
176 m520x_clk_init(); 174 m520x_clk_init();
177 m520x_uarts_init(); 175 m520x_uarts_init();
178 m520x_fec_init(); 176 m520x_fec_init();
179#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
180 m520x_qspi_init(); 177 m520x_qspi_init();
181#endif
182} 178}
183 179
184/***************************************************************************/ 180/***************************************************************************/