From patchwork Fri Oct 1 11:55:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh KUMAR X-Patchwork-Id: 223902 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o91C4g6i014143 for ; Fri, 1 Oct 2010 12:04:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756717Ab0JAL6M (ORCPT ); Fri, 1 Oct 2010 07:58:12 -0400 Received: from eu1sys200aog110.obsmtp.com ([207.126.144.129]:56199 "EHLO eu1sys200aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756706Ab0JAL6K (ORCPT ); Fri, 1 Oct 2010 07:58:10 -0400 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKTKXMxxK8rqdbrGOuyAZupO5cxQb2SLB5@postini.com; Fri, 01 Oct 2010 11:58:09 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BAE39A8; Fri, 1 Oct 2010 11:57:48 +0000 (GMT) Received: from mail2.dlh.st.com (mail2.dlh.st.com [10.199.8.22]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 05546264A; Fri, 1 Oct 2010 11:57:43 +0000 (GMT) Received: from localhost (dlhl0509.dlh.st.com [10.199.7.86]) by mail2.dlh.st.com (MOS 3.8.7a) with ESMTP id CUF00977 (AUTH viresh.kumar@st.com); Fri, 1 Oct 2010 17:27:43 +0530 (IST) From: Viresh KUMAR To: linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, a.zummo@towertech.it, dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, linux-mtd@lists.infradead.org, dwmw2@infradead.org Cc: Viresh Kumar , shiraz.hashim@st.com, vipin.kumar@st.com, deepak.sikri@st.com, armando.visconti@st.com, vipulkumar.samar@st.com, rajeev-dlh.kumar@st.com, pratyush.anand@st.com, bhupesh.sharma@st.com Subject: [PATCH V2 31/69] ST SPEAr: Adding support for SSP PL022 Date: Fri, 1 Oct 2010 17:25:51 +0530 Message-Id: X-Mailer: git-send-email 1.7.2.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Oct 2010 12:04:54 +0000 (UTC) diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h index 745dd99..7419e0b 100644 --- a/arch/arm/mach-spear13xx/include/mach/generic.h +++ b/arch/arm/mach-spear13xx/include/mach/generic.h @@ -30,6 +30,7 @@ /* Add spear13xx family device structure declarations here */ extern struct amba_device spear13xx_gpio_device[]; +extern struct amba_device spear13xx_ssp_device; extern struct amba_device spear13xx_uart_device; extern struct platform_device spear13xx_ehci0_device; extern struct platform_device spear13xx_ehci1_device; diff --git a/arch/arm/mach-spear13xx/spear1300_evb.c b/arch/arm/mach-spear13xx/spear1300_evb.c index d8698e0..ba46f61 100644 --- a/arch/arm/mach-spear13xx/spear1300_evb.c +++ b/arch/arm/mach-spear13xx/spear1300_evb.c @@ -12,7 +12,10 @@ */ #include +#include #include +#include +#include #include #include #include @@ -22,10 +25,12 @@ #include #include #include +#include static struct amba_device *amba_devs[] __initdata = { &spear13xx_gpio_device[0], &spear13xx_gpio_device[1], + &spear13xx_ssp_device, &spear13xx_uart_device, }; @@ -50,6 +55,14 @@ static struct kbd_platform_data kbd_data = { .rep = 1, }; +static struct spi_board_info __initdata spi_board_info[] = { +}; + +static void __init spi_init(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); +} + #ifdef CONFIG_PCIEPORTBUS /* this function is needed for PCIE host and device driver. Same * controller can not be programmed as host as well as device. So host @@ -107,6 +120,8 @@ static void __init spear1300_evb_init(void) /* Add Amba Devices */ for (i = 0; i < ARRAY_SIZE(amba_devs); i++) amba_device_register(amba_devs[i], &iomem_resource); + + spi_init(); } MACHINE_START(SPEAR1300, "ST-SPEAR1300-EVB") diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c index 25a1964..6455ebb 100644 --- a/arch/arm/mach-spear13xx/spear13xx.c +++ b/arch/arm/mach-spear13xx/spear13xx.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -64,6 +65,36 @@ struct amba_device spear13xx_gpio_device[] = { } }; +/* ssp device registeration */ +static struct pl022_ssp_controller ssp_platform_data = { + .bus_id = 0, + .enable_dma = 0, + /* + * This is number of spi devices that can be connected to spi. There are + * two type of chipselects on which slave devices can work. One is chip + * select provided by spi masters other is controlled through external + * gpio's. We can't use chipselect provided from spi master (because as + * soon as FIFO becomes empty, CS is disabled and transfer ends). So + * this number now depends on number of gpios available for spi. each + * slave on each master requires a separate gpio pin. + */ + .num_chipselect = 2, +}; + +struct amba_device spear13xx_ssp_device = { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022", + .platform_data = &ssp_platform_data, + }, + .res = { + .start = SPEAR13XX_SSP_BASE, + .end = SPEAR13XX_SSP_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {IRQ_SSP, NO_IRQ}, +}; + /* uart device registeration */ struct amba_device spear13xx_uart_device = { .dev = { diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 6aac229..04ce8700 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h @@ -32,6 +32,7 @@ /* Add spear3xx family device structure declarations here */ extern struct amba_device gpio_device; +extern struct amba_device ssp0_device; extern struct amba_device uart_device; extern struct amba_device wdt_device; extern struct platform_device ehci_device; @@ -176,6 +177,7 @@ void __init spear310_init(void); #elif defined(CONFIG_MACH_SPEAR320) /* Add spear320 machine device structure declarations here */ extern struct amba_device clcd_device; +extern struct amba_device ssp_device[]; extern struct platform_device i2c1_device; extern struct platform_device nand_device; extern struct platform_device plgpio_device; diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c index 41ad013..c702cc3 100644 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ b/arch/arm/mach-spear3xx/spear300_evb.c @@ -15,11 +15,15 @@ #include #include #include +#include +#include #include +#include #include #include #include #include +#include /* padmux devices to enable */ static struct pmx_dev *pmx_devs[] = { @@ -40,6 +44,7 @@ static struct pmx_dev *pmx_devs[] = { static struct amba_device *amba_devs[] __initdata = { /* spear3xx specific devices */ &gpio_device, + &ssp0_device, &uart_device, &wdt_device, @@ -71,6 +76,29 @@ static struct kbd_platform_data kbd_data = { .rep = 1, }; +/* spi board information */ +/* spi0 flash Chip Select Control function, controlled by gpio pin mentioned */ +DECLARE_SPI_CS_CONTROL(0, flash, RAS_GPIO_3); +/* spi0 flash Chip Info structure */ +DECLARE_SPI_CHIP_INFO(0, flash, spi0_flash_cs_control); + +static struct spi_board_info __initdata spi_board_info[] = { + /* spi0 board info */ + { + .modalias = "m25p80", + .controller_data = &spi0_flash_chip_info, + .max_speed_hz = 400000, + .bus_num = 0, + .chip_select = 1, + .mode = 0, + } +}; + +static void __init spi_init(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); +} + static void __init spear300_evb_init(void) { unsigned int i; @@ -102,6 +130,8 @@ static void __init spear300_evb_init(void) /* Add Amba Devices */ for (i = 0; i < ARRAY_SIZE(amba_devs); i++) amba_device_register(amba_devs[i], &iomem_resource); + + spi_init(); } MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c index 857afae..bff90b3 100644 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ b/arch/arm/mach-spear3xx/spear310_evb.c @@ -15,10 +15,14 @@ #include #include #include +#include +#include #include +#include #include #include #include +#include /* padmux devices to enable */ static struct pmx_dev *pmx_devs[] = { @@ -47,6 +51,7 @@ static struct pmx_dev *pmx_devs[] = { static struct amba_device *amba_devs[] __initdata = { /* spear3xx specific devices */ &gpio_device, + &ssp0_device, &uart_device, &wdt_device, @@ -67,6 +72,41 @@ static struct platform_device *plat_devs[] __initdata = { &plgpio_device, }; +/* spi board information */ +/* spi0 flash Chip Select Control function, controlled by gpio pin mentioned */ +DECLARE_SPI_CS_CONTROL(0, flash, BASIC_GPIO_3); +/* spi0 flash Chip Info structure */ +DECLARE_SPI_CHIP_INFO(0, flash, spi0_flash_cs_control); + +/* spi0 spidev Chip Select Control function, controlled by gpio pin mentioned */ +DECLARE_SPI_CS_CONTROL(0, dev, BASIC_GPIO_4); +/* spi0 spidev Chip Info structure */ +DECLARE_SPI_CHIP_INFO(0, dev, spi0_dev_cs_control); + +static struct spi_board_info __initdata spi_board_info[] = { + /* spi0 board info */ + { + .modalias = "spidev", + .controller_data = &spi0_dev_chip_info, + .max_speed_hz = 10000000, + .bus_num = 0, + .chip_select = 0, + .mode = 0, + }, { + .modalias = "m25p80", + .controller_data = &spi0_flash_chip_info, + .max_speed_hz = 400000, + .bus_num = 0, + .chip_select = 1, + .mode = 0, + } +}; + +static void __init spi_init(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); +} + static void __init spear310_evb_init(void) { unsigned int i; @@ -95,6 +135,8 @@ static void __init spear310_evb_init(void) /* Add Amba Devices */ for (i = 0; i < ARRAY_SIZE(amba_devs); i++) amba_device_register(amba_devs[i], &iomem_resource); + + spi_init(); } MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index 3def755..f87cc97 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c @@ -11,6 +11,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -403,6 +404,47 @@ struct amba_device clcd_device = { .irq = {VIRQ_CLCD, NO_IRQ}, }; +/* ssp device registeration */ +static struct pl022_ssp_controller ssp_platform_data[] = { + { + .bus_id = 1, + .enable_dma = 0, + .num_chipselect = 2, + }, { + .bus_id = 2, + .enable_dma = 0, + .num_chipselect = 2, + } +}; + +struct amba_device ssp_device[] = { + { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.1", + .platform_data = &ssp_platform_data[0], + }, + .res = { + .start = SPEAR320_SSP0_BASE, + .end = SPEAR320_SSP0_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {VIRQ_SSP1, NO_IRQ}, + }, { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.2", + .platform_data = &ssp_platform_data[1], + }, + .res = { + .start = SPEAR320_SSP1_BASE, + .end = SPEAR320_SSP1_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {VIRQ_SSP2, NO_IRQ}, + } +}; + /* plgpio device registeration */ static struct plgpio_platform_data plgpio_plat_data = { .gpio_base = 8, diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 3a066bb..dcca84e 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c @@ -15,10 +15,14 @@ #include #include #include +#include +#include #include +#include #include #include #include +#include /* padmux devices to enable */ static struct pmx_dev *pmx_devs[] = { @@ -67,6 +71,14 @@ static struct platform_device *plat_devs[] __initdata = { &pwm_device, }; +static struct spi_board_info __initdata spi_board_info[] = { +}; + +static void __init spi_init(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); +} + static void __init spear320_evb_init(void) { unsigned int i; @@ -95,6 +107,8 @@ static void __init spear320_evb_init(void) /* Add Amba Devices */ for (i = 0; i < ARRAY_SIZE(amba_devs); i++) amba_device_register(amba_devs[i], &iomem_resource); + + spi_init(); } MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index 88a6bd4..b4c3ad7 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -41,6 +42,36 @@ struct amba_device gpio_device = { .irq = {IRQ_BASIC_GPIO, NO_IRQ}, }; +/* ssp device registeration */ +static struct pl022_ssp_controller ssp_platform_data = { + .bus_id = 0, + .enable_dma = 0, + /* + * This is number of spi devices that can be connected to spi. There are + * two type of chipselects on which slave devices can work. One is chip + * select provided by spi masters other is controlled through external + * gpio's. We can't use chipselect provided from spi master (because as + * soon as FIFO becomes empty, CS is disabled and transfer ends). So + * this number now depends on number of gpios available for spi. each + * slave on each master requires a separate gpio pin. + */ + .num_chipselect = 2, +}; + +struct amba_device ssp0_device = { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.0", + .platform_data = &ssp_platform_data, + }, + .res = { + .start = SPEAR3XX_ICM1_SSP_BASE, + .end = SPEAR3XX_ICM1_SSP_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {IRQ_SSP, NO_IRQ}, +}; + /* uart device registeration */ struct amba_device uart_device = { .dev = { diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index ff90419..dd29298 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h @@ -31,6 +31,7 @@ /* Add spear6xx family device structure declarations here */ extern struct amba_device clcd_device; extern struct amba_device gpio_device[]; +extern struct amba_device ssp_device[]; extern struct amba_device uart_device[]; extern struct amba_device wdt_device; extern struct platform_device ehci0_device; diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h index a835f5b..31486e5 100644 --- a/arch/arm/mach-spear6xx/include/mach/spear.h +++ b/arch/arm/mach-spear6xx/include/mach/spear.h @@ -68,8 +68,8 @@ #define SPEAR6XX_ICM2_GPIO_BASE 0xD8100000 #define SPEAR6XX_ICM2_GPIO_SIZE 0x00080000 -#define SPEAR6XX_ICM2_SPI2_BASE 0xD8180000 -#define SPEAR6XX_ICM2_SPI2_SIZE 0x00080000 +#define SPEAR6XX_ICM2_SSP2_BASE 0xD8180000 +#define SPEAR6XX_ICM2_SSP2_SIZE 0x00080000 #define SPEAR6XX_ICM2_ADC_BASE 0xD8200000 #define SPEAR6XX_ICM2_ADC_SIZE 0x00080000 diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c index f3b1fb4..a98d7d6 100644 --- a/arch/arm/mach-spear6xx/spear600_evb.c +++ b/arch/arm/mach-spear6xx/spear600_evb.c @@ -15,16 +15,24 @@ #include #include #include +#include +#include +#include #include +#include #include #include #include +#include static struct amba_device *amba_devs[] __initdata = { &clcd_device, &gpio_device[0], &gpio_device[1], &gpio_device[2], + &ssp_device[0], + &ssp_device[1], + &ssp_device[2], &uart_device[0], &uart_device[1], &wdt_device, @@ -41,6 +49,14 @@ static struct platform_device *plat_devs[] __initdata = { &smi_device, }; +static struct spi_board_info __initdata spi_board_info[] = { +}; + +static void __init spi_init(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); +} + static void __init spear600_evb_init(void) { unsigned int i; @@ -64,6 +80,8 @@ static void __init spear600_evb_init(void) /* Add Amba Devices */ for (i = 0; i < ARRAY_SIZE(amba_devs); i++) amba_device_register(amba_devs[i], &iomem_resource); + + spi_init(); } diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index cc4fd39..82788e1 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -41,6 +42,73 @@ struct amba_device clcd_device = { .irq = {IRQ_BASIC_CLCD, NO_IRQ}, }; +/* ssp device registeration */ +static struct pl022_ssp_controller ssp_platform_data[] = { + { + .bus_id = 0, + .enable_dma = 0, + /* + * This is number of spi devices that can be connected to spi. + * There are two type of chipselects on which slave devices can + * work. One is chip select provided by spi masters other is + * controlled through external gpio's. We can't use chipselect + * provided from spi master (because as soon as FIFO becomes + * empty, CS is disabled and transfer ends). So this number now + * depends on number of gpios available for spi. each slave on + * each master requires a separate gpio pin. + */ + .num_chipselect = 2, + }, { + .bus_id = 1, + .enable_dma = 0, + .num_chipselect = 2, + }, { + .bus_id = 2, + .enable_dma = 0, + .num_chipselect = 2, + } +}; + +struct amba_device ssp_device[] = { + { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.0", + .platform_data = &ssp_platform_data[0], + }, + .res = { + .start = SPEAR6XX_ICM1_SSP0_BASE, + .end = SPEAR6XX_ICM1_SSP0_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {IRQ_SSP_1, NO_IRQ}, + }, { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.1", + .platform_data = &ssp_platform_data[1], + }, + .res = { + .start = SPEAR6XX_ICM1_SSP1_BASE, + .end = SPEAR6XX_ICM1_SSP1_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {IRQ_SSP_2, NO_IRQ}, + }, { + .dev = { + .coherent_dma_mask = ~0, + .init_name = "ssp-pl022.2", + .platform_data = &ssp_platform_data[2], + }, + .res = { + .start = SPEAR6XX_ICM2_SSP2_BASE, + .end = SPEAR6XX_ICM2_SSP2_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + .irq = {IRQ_APPL_SSP, NO_IRQ}, + } +}; + /* uart device registeration */ struct amba_device uart_device[] = { { diff --git a/arch/arm/plat-spear/include/plat/spi.h b/arch/arm/plat-spear/include/plat/spi.h new file mode 100644 index 0000000..a2c53f3 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/spi.h @@ -0,0 +1,77 @@ +/* + * arch/arm/plat-spear/include/plat/spi.h + * + * SPI board specific definitions common to multiple boards on multiple + * machines. + * + * Copyright (C) 2010 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __PLAT_SPI_H +#define __PLAT_SPI_H + +#include +#include + +/* spi board information */ +static inline int spi_cs_gpio_request(u32 gpio_pin) +{ + int ret; + + ret = gpio_request(gpio_pin, "SPI_CS"); + if (ret < 0) { + printk(KERN_ERR "SPI: gpio:%d request fail\n", gpio_pin); + return ret; + } else { + ret = gpio_direction_output(gpio_pin, 1); + if (ret) { + printk(KERN_ERR "SPI: gpio:%d direction set fail\n", + gpio_pin); + return ret; + } + } + return 0; +} + +/* This will define cs_control function for a specific spi slave */ +#define DECLARE_SPI_CS_CONTROL(id, type, gpio) \ +static void spi##id##_##type##_cs_control(u32 control) \ +{ \ + static int count, ret; \ + \ + if (unlikely(!count)) { \ + count++; \ + ret = spi_cs_gpio_request(gpio); \ + } \ + \ + if (!ret) \ + gpio_set_value(gpio, control); \ +} + +/* This will define CHIP_INFO structure for a specific spi slave */ +#define DECLARE_SPI_CHIP_INFO(id, type, chip_select_control) \ +struct pl022_config_chip spi##id##_##type##_chip_info = { \ + .lbm = LOOPBACK_DISABLED, \ + .iface = SSP_INTERFACE_MOTOROLA_SPI, \ + .hierarchy = SSP_MASTER, \ + .slave_tx_disable = 0, \ + .endian_tx = SSP_TX_LSB, \ + .endian_rx = SSP_RX_LSB, \ + .data_size = SSP_DATA_BITS_8, \ + .com_mode = INTERRUPT_TRANSFER, \ + .rx_lev_trig = SSP_RX_1_OR_MORE_ELEM, \ + .tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC, \ + .clk_phase = SSP_CLK_SECOND_EDGE, \ + .clk_pol = SSP_CLK_POL_IDLE_LOW, \ + .cs_control = chip_select_control, \ +}; + +#define DECLARE_SPI_CHIP_INFO_NULL_ID(chip_select_control) \ +DECLARE_SPI_CHIP_INFO(, chip_select_control) + +#endif /* __PLAT_SPI_H */