Skip to content

Commit 83ca600

Browse files
Steven Kinggregungerer
authored andcommitted
m68knommu: enable qspi support when SPI_COLDFIRE_QSPI = m
Enable Coldfire QSPI support when SPI_COLDFIRE_QSPI is built as a module. This version of the patch combines changes to the config files and device.c and uses IF_ENABLED (thanks to Sam Ravnborg for the suggestion). Signed-off-by: Steven King <[email protected]> Signed-off-by: Greg Ungerer <[email protected]>
1 parent d48b97b commit 83ca600

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

arch/m68k/platform/520x/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/***************************************************************************/
2424

25-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
25+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
2626

2727
static void __init m520x_qspi_init(void)
2828
{
@@ -35,7 +35,7 @@ static void __init m520x_qspi_init(void)
3535
writew(par, MCF_GPIO_PAR_UART);
3636
}
3737

38-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
38+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
3939

4040
/***************************************************************************/
4141

@@ -79,7 +79,7 @@ void __init config_BSP(char *commandp, int size)
7979
mach_sched_init = hw_timer_init;
8080
m520x_uarts_init();
8181
m520x_fec_init();
82-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
82+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
8383
m520x_qspi_init();
8484
#endif
8585
}

arch/m68k/platform/523x/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/***************************************************************************/
2424

25-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
25+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
2626

2727
static void __init m523x_qspi_init(void)
2828
{
@@ -36,7 +36,7 @@ static void __init m523x_qspi_init(void)
3636
writew(par, MCFGPIO_PAR_TIMER);
3737
}
3838

39-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
39+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
4040

4141
/***************************************************************************/
4242

@@ -58,7 +58,7 @@ void __init config_BSP(char *commandp, int size)
5858
{
5959
mach_sched_init = hw_timer_init;
6060
m523x_fec_init();
61-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
61+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
6262
m523x_qspi_init();
6363
#endif
6464
}

arch/m68k/platform/5249/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static struct platform_device *m5249_devices[] __initdata = {
5151

5252
/***************************************************************************/
5353

54-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
54+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
5555

5656
static void __init m5249_qspi_init(void)
5757
{
@@ -61,7 +61,7 @@ static void __init m5249_qspi_init(void)
6161
mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI);
6262
}
6363

64-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
64+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
6565

6666
/***************************************************************************/
6767

@@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size)
9090
#ifdef CONFIG_M5249C3
9191
m5249_smc91x_init();
9292
#endif
93-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
93+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
9494
m5249_qspi_init();
9595
#endif
9696
}

arch/m68k/platform/527x/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/***************************************************************************/
2525

26-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
26+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
2727

2828
static void __init m527x_qspi_init(void)
2929
{
@@ -42,7 +42,7 @@ static void __init m527x_qspi_init(void)
4242
#endif
4343
}
4444

45-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
45+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
4646

4747
/***************************************************************************/
4848

@@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size)
9090
mach_sched_init = hw_timer_init;
9191
m527x_uarts_init();
9292
m527x_fec_init();
93-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
93+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
9494
m527x_qspi_init();
9595
#endif
9696
}

arch/m68k/platform/528x/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424

2525
/***************************************************************************/
2626

27-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
27+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
2828

2929
static void __init m528x_qspi_init(void)
3030
{
3131
/* setup Port QS for QSPI with gpio CS control */
3232
__raw_writeb(0x07, MCFGPIO_PQSPAR);
3333
}
3434

35-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
35+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
3636

3737
/***************************************************************************/
3838

@@ -98,7 +98,7 @@ void __init config_BSP(char *commandp, int size)
9898
mach_sched_init = hw_timer_init;
9999
m528x_uarts_init();
100100
m528x_fec_init();
101-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
101+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
102102
m528x_qspi_init();
103103
#endif
104104
}

arch/m68k/platform/532x/config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030

3131
/***************************************************************************/
3232

33-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
33+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
3434

3535
static void __init m532x_qspi_init(void)
3636
{
3737
/* setup QSPS pins for QSPI with gpio CS control */
3838
writew(0x01f0, MCF_GPIO_PAR_QSPI);
3939
}
4040

41-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
41+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
4242

4343
/***************************************************************************/
4444

@@ -77,7 +77,7 @@ void __init config_BSP(char *commandp, int size)
7777
mach_sched_init = hw_timer_init;
7878
m532x_uarts_init();
7979
m532x_fec_init();
80-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
80+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
8181
m532x_qspi_init();
8282
#endif
8383

arch/m68k/platform/coldfire/device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static struct platform_device mcf_fec1 = {
121121
#endif /* MCFFEC_BASE1 */
122122
#endif /* CONFIG_FEC */
123123

124-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
124+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
125125
/*
126126
* The ColdFire QSPI module is an SPI protocol hardware block used
127127
* on a number of different ColdFire CPUs.
@@ -274,7 +274,7 @@ static struct platform_device mcf_qspi = {
274274
.resource = mcf_qspi_resources,
275275
.dev.platform_data = &mcf_qspi_data,
276276
};
277-
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
277+
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
278278

279279
static struct platform_device *mcf_devices[] __initdata = {
280280
&mcf_uart,
@@ -284,7 +284,7 @@ static struct platform_device *mcf_devices[] __initdata = {
284284
&mcf_fec1,
285285
#endif
286286
#endif
287-
#ifdef CONFIG_SPI_COLDFIRE_QSPI
287+
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
288288
&mcf_qspi,
289289
#endif
290290
};

0 commit comments

Comments
 (0)