diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-05-12 16:07:40 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-05-12 16:07:40 +0200 |
commit | f65ad993eef7522fcf1a9fa4f6703e4399f5b56b (patch) | |
tree | 4e0f8605aa7175401ef2a122ff2e56a02a35bf7b /board | |
parent | b9655280e2f48cc6d095134ce4c00914659d01e6 (diff) | |
download | barebox-f65ad993eef7522fcf1a9fa4f6703e4399f5b56b.tar.gz barebox-f65ad993eef7522fcf1a9fa4f6703e4399f5b56b.tar.xz |
[pcm038]: Fix compilation without spi support
Diffstat (limited to 'board')
-rw-r--r-- | board/pcm038/pcm038.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/pcm038/pcm038.c b/board/pcm038/pcm038.c index 106f37e149..9df5e7564d 100644 --- a/board/pcm038/pcm038.c +++ b/board/pcm038/pcm038.c @@ -65,6 +65,7 @@ static struct device_d fec_dev = { .type = DEVICE_TYPE_ETHER, }; +#if defined CONFIG_DRIVER_SPI_IMX && defined DRIVER_SPI_MC13783 static struct device_d spi_dev = { .name = "imx_spi", .id = "spi0", @@ -79,6 +80,7 @@ static struct spi_board_info pcm038_spi_board_info[] = { .chip_select = 0, } }; +#endif static int pcm038_devices_init(void) { @@ -125,8 +127,10 @@ static int pcm038_devices_init(void) PCCR0 |= PCCR0_CSPI1_EN; PCCR1 |= PCCR1_PERCLK2_EN; +#if defined CONFIG_DRIVER_SPI_IMX && defined DRIVER_SPI_MC13783 spi_register_board_info(pcm038_spi_board_info, ARRAY_SIZE(pcm038_spi_board_info)); register_device(&spi_dev); +#endif dev_add_partition(&cfi_dev, 0x00000, 0x20000, PARTITION_FIXED, "self"); dev_add_partition(&cfi_dev, 0x20000, 0x20000, PARTITION_FIXED, "env"); @@ -158,6 +162,7 @@ console_initcall(pcm038_console_init); static int pcm038_power_init(void) { +#if defined CONFIG_DRIVER_SPI_IMX && defined DRIVER_SPI_MC13783 volatile int i = 0; int ret; @@ -194,7 +199,12 @@ static int pcm038_power_init(void) CSCR_MPEN; PCDR1 = 0x09030911; + out: +#else +#warning no pmic support enabled. your pcm038 will run on low speed +#endif + /* Register the fec device after the PLL re-initialisation * as the fec depends on the (now higher) ipg clock */ |