diff options
| -rw-r--r-- | arch/arm/mach-exynos4/cpu.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-exynos4/dev-audio.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos4/headsmp.S | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos4/mach-smdkv310.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-s3c2440/mach-mini2440.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-s3c64xx/dev-spi.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-s5p64x0/dev-spi.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-s5pc100/dev-spi.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-s5pv210/dev-spi.c | 2 | ||||
| -rw-r--r-- | arch/arm/plat-s3c24xx/dma.c | 12 | ||||
| -rw-r--r-- | arch/arm/plat-s5p/s5p-time.c | 4 | ||||
| -rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 6 | ||||
| -rw-r--r-- | arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 2 | ||||
| -rw-r--r-- | drivers/spi/spi_s3c64xx.c | 4 |
14 files changed, 37 insertions, 23 deletions
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 9babe4473e88..bfd621460abf 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <plat/sdhci.h> | 23 | #include <plat/sdhci.h> |
| 24 | #include <plat/devs.h> | 24 | #include <plat/devs.h> |
| 25 | #include <plat/fimc-core.h> | 25 | #include <plat/fimc-core.h> |
| 26 | #include <plat/iic-core.h> | ||
| 26 | 27 | ||
| 27 | #include <mach/regs-irq.h> | 28 | #include <mach/regs-irq.h> |
| 28 | 29 | ||
| @@ -132,6 +133,11 @@ void __init exynos4_map_io(void) | |||
| 132 | s3c_fimc_setname(1, "exynos4-fimc"); | 133 | s3c_fimc_setname(1, "exynos4-fimc"); |
| 133 | s3c_fimc_setname(2, "exynos4-fimc"); | 134 | s3c_fimc_setname(2, "exynos4-fimc"); |
| 134 | s3c_fimc_setname(3, "exynos4-fimc"); | 135 | s3c_fimc_setname(3, "exynos4-fimc"); |
| 136 | |||
| 137 | /* The I2C bus controllers are directly compatible with s3c2440 */ | ||
| 138 | s3c_i2c0_setname("s3c2440-i2c"); | ||
| 139 | s3c_i2c1_setname("s3c2440-i2c"); | ||
| 140 | s3c_i2c2_setname("s3c2440-i2c"); | ||
| 135 | } | 141 | } |
| 136 | 142 | ||
| 137 | void __init exynos4_init_clocks(int xtal) | 143 | void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-exynos4/dev-audio.c b/arch/arm/mach-exynos4/dev-audio.c index 1eed5f9f7bd3..983069a53239 100644 --- a/arch/arm/mach-exynos4/dev-audio.c +++ b/arch/arm/mach-exynos4/dev-audio.c | |||
| @@ -330,7 +330,7 @@ struct platform_device exynos4_device_ac97 = { | |||
| 330 | 330 | ||
| 331 | static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) | 331 | static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) |
| 332 | { | 332 | { |
| 333 | s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 2, S3C_GPIO_SFN(3)); | 333 | s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 2, S3C_GPIO_SFN(4)); |
| 334 | 334 | ||
| 335 | return 0; | 335 | return 0; |
| 336 | } | 336 | } |
diff --git a/arch/arm/mach-exynos4/headsmp.S b/arch/arm/mach-exynos4/headsmp.S index 6c6cfc50c46b..3cdeb3647542 100644 --- a/arch/arm/mach-exynos4/headsmp.S +++ b/arch/arm/mach-exynos4/headsmp.S | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | 15 | ||
| 16 | __INIT | 16 | __CPUINIT |
| 17 | 17 | ||
| 18 | /* | 18 | /* |
| 19 | * exynos4 specific entry point for secondary CPUs. This provides | 19 | * exynos4 specific entry point for secondary CPUs. This provides |
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index 152676471b67..edd814110da8 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c | |||
| @@ -78,9 +78,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { | |||
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { | 80 | static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { |
| 81 | .cd_type = S3C_SDHCI_CD_GPIO, | 81 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
| 82 | .ext_cd_gpio = EXYNOS4_GPK0(2), | ||
| 83 | .ext_cd_gpio_invert = 1, | ||
| 84 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | 82 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, |
| 85 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT | 83 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT |
| 86 | .max_width = 8, | 84 | .max_width = 8, |
| @@ -96,9 +94,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { | |||
| 96 | }; | 94 | }; |
| 97 | 95 | ||
| 98 | static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { | 96 | static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { |
| 99 | .cd_type = S3C_SDHCI_CD_GPIO, | 97 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
| 100 | .ext_cd_gpio = EXYNOS4_GPK2(2), | ||
| 101 | .ext_cd_gpio_invert = 1, | ||
| 102 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | 98 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, |
| 103 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT | 99 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT |
| 104 | .max_width = 8, | 100 | .max_width = 8, |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index dd3120df09fe..fc2dc0b3d4fe 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
| @@ -552,7 +552,7 @@ struct mini2440_features_t { | |||
| 552 | struct platform_device *optional[8]; | 552 | struct platform_device *optional[8]; |
| 553 | }; | 553 | }; |
| 554 | 554 | ||
| 555 | static void mini2440_parse_features( | 555 | static void __init mini2440_parse_features( |
| 556 | struct mini2440_features_t * features, | 556 | struct mini2440_features_t * features, |
| 557 | const char * features_str ) | 557 | const char * features_str ) |
| 558 | { | 558 | { |
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c index 82db072cb836..5e6b42089eb4 100644 --- a/arch/arm/mach-s3c64xx/dev-spi.c +++ b/arch/arm/mach-s3c64xx/dev-spi.c | |||
| @@ -88,6 +88,7 @@ static struct s3c64xx_spi_info s3c64xx_spi0_pdata = { | |||
| 88 | .cfg_gpio = s3c64xx_spi_cfg_gpio, | 88 | .cfg_gpio = s3c64xx_spi_cfg_gpio, |
| 89 | .fifo_lvl_mask = 0x7f, | 89 | .fifo_lvl_mask = 0x7f, |
| 90 | .rx_lvl_offset = 13, | 90 | .rx_lvl_offset = 13, |
| 91 | .tx_st_done = 21, | ||
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| 93 | static u64 spi_dmamask = DMA_BIT_MASK(32); | 94 | static u64 spi_dmamask = DMA_BIT_MASK(32); |
| @@ -132,6 +133,7 @@ static struct s3c64xx_spi_info s3c64xx_spi1_pdata = { | |||
| 132 | .cfg_gpio = s3c64xx_spi_cfg_gpio, | 133 | .cfg_gpio = s3c64xx_spi_cfg_gpio, |
| 133 | .fifo_lvl_mask = 0x7f, | 134 | .fifo_lvl_mask = 0x7f, |
| 134 | .rx_lvl_offset = 13, | 135 | .rx_lvl_offset = 13, |
| 136 | .tx_st_done = 21, | ||
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 137 | struct platform_device s3c64xx_device_spi1 = { | 139 | struct platform_device s3c64xx_device_spi1 = { |
diff --git a/arch/arm/mach-s5p64x0/dev-spi.c b/arch/arm/mach-s5p64x0/dev-spi.c index e78ee18c76e3..ac825e826326 100644 --- a/arch/arm/mach-s5p64x0/dev-spi.c +++ b/arch/arm/mach-s5p64x0/dev-spi.c | |||
| @@ -112,12 +112,14 @@ static struct s3c64xx_spi_info s5p6440_spi0_pdata = { | |||
| 112 | .cfg_gpio = s5p6440_spi_cfg_gpio, | 112 | .cfg_gpio = s5p6440_spi_cfg_gpio, |
| 113 | .fifo_lvl_mask = 0x1ff, | 113 | .fifo_lvl_mask = 0x1ff, |
| 114 | .rx_lvl_offset = 15, | 114 | .rx_lvl_offset = 15, |
| 115 | .tx_st_done = 25, | ||
| 115 | }; | 116 | }; |
| 116 | 117 | ||
| 117 | static struct s3c64xx_spi_info s5p6450_spi0_pdata = { | 118 | static struct s3c64xx_spi_info s5p6450_spi0_pdata = { |
| 118 | .cfg_gpio = s5p6450_spi_cfg_gpio, | 119 | .cfg_gpio = s5p6450_spi_cfg_gpio, |
| 119 | .fifo_lvl_mask = 0x1ff, | 120 | .fifo_lvl_mask = 0x1ff, |
| 120 | .rx_lvl_offset = 15, | 121 | .rx_lvl_offset = 15, |
| 122 | .tx_st_done = 25, | ||
| 121 | }; | 123 | }; |
| 122 | 124 | ||
| 123 | static u64 spi_dmamask = DMA_BIT_MASK(32); | 125 | static u64 spi_dmamask = DMA_BIT_MASK(32); |
| @@ -160,12 +162,14 @@ static struct s3c64xx_spi_info s5p6440_spi1_pdata = { | |||
| 160 | .cfg_gpio = s5p6440_spi_cfg_gpio, | 162 | .cfg_gpio = s5p6440_spi_cfg_gpio, |
| 161 | .fifo_lvl_mask = 0x7f, | 163 | .fifo_lvl_mask = 0x7f, |
| 162 | .rx_lvl_offset = 15, | 164 | .rx_lvl_offset = 15, |
| 165 | .tx_st_done = 25, | ||
| 163 | }; | 166 | }; |
| 164 | 167 | ||
| 165 | static struct s3c64xx_spi_info s5p6450_spi1_pdata = { | 168 | static struct s3c64xx_spi_info s5p6450_spi1_pdata = { |
| 166 | .cfg_gpio = s5p6450_spi_cfg_gpio, | 169 | .cfg_gpio = s5p6450_spi_cfg_gpio, |
| 167 | .fifo_lvl_mask = 0x7f, | 170 | .fifo_lvl_mask = 0x7f, |
| 168 | .rx_lvl_offset = 15, | 171 | .rx_lvl_offset = 15, |
| 172 | .tx_st_done = 25, | ||
| 169 | }; | 173 | }; |
| 170 | 174 | ||
| 171 | struct platform_device s5p64x0_device_spi1 = { | 175 | struct platform_device s5p64x0_device_spi1 = { |
diff --git a/arch/arm/mach-s5pc100/dev-spi.c b/arch/arm/mach-s5pc100/dev-spi.c index 57b19794d9bb..e5d6c4dceb56 100644 --- a/arch/arm/mach-s5pc100/dev-spi.c +++ b/arch/arm/mach-s5pc100/dev-spi.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <mach/dma.h> | 15 | #include <mach/dma.h> |
| 16 | #include <mach/map.h> | 16 | #include <mach/map.h> |
| 17 | #include <mach/spi-clocks.h> | 17 | #include <mach/spi-clocks.h> |
| 18 | #include <mach/irqs.h> | ||
| 18 | 19 | ||
| 19 | #include <plat/s3c64xx-spi.h> | 20 | #include <plat/s3c64xx-spi.h> |
| 20 | #include <plat/gpio-cfg.h> | 21 | #include <plat/gpio-cfg.h> |
| @@ -90,6 +91,7 @@ static struct s3c64xx_spi_info s5pc100_spi0_pdata = { | |||
| 90 | .fifo_lvl_mask = 0x7f, | 91 | .fifo_lvl_mask = 0x7f, |
| 91 | .rx_lvl_offset = 13, | 92 | .rx_lvl_offset = 13, |
| 92 | .high_speed = 1, | 93 | .high_speed = 1, |
| 94 | .tx_st_done = 21, | ||
| 93 | }; | 95 | }; |
| 94 | 96 | ||
| 95 | static u64 spi_dmamask = DMA_BIT_MASK(32); | 97 | static u64 spi_dmamask = DMA_BIT_MASK(32); |
| @@ -134,6 +136,7 @@ static struct s3c64xx_spi_info s5pc100_spi1_pdata = { | |||
| 134 | .fifo_lvl_mask = 0x7f, | 136 | .fifo_lvl_mask = 0x7f, |
| 135 | .rx_lvl_offset = 13, | 137 | .rx_lvl_offset = 13, |
| 136 | .high_speed = 1, | 138 | .high_speed = 1, |
| 139 | .tx_st_done = 21, | ||
| 137 | }; | 140 | }; |
| 138 | 141 | ||
| 139 | struct platform_device s5pc100_device_spi1 = { | 142 | struct platform_device s5pc100_device_spi1 = { |
| @@ -176,6 +179,7 @@ static struct s3c64xx_spi_info s5pc100_spi2_pdata = { | |||
| 176 | .fifo_lvl_mask = 0x7f, | 179 | .fifo_lvl_mask = 0x7f, |
| 177 | .rx_lvl_offset = 13, | 180 | .rx_lvl_offset = 13, |
| 178 | .high_speed = 1, | 181 | .high_speed = 1, |
| 182 | .tx_st_done = 21, | ||
| 179 | }; | 183 | }; |
| 180 | 184 | ||
| 181 | struct platform_device s5pc100_device_spi2 = { | 185 | struct platform_device s5pc100_device_spi2 = { |
diff --git a/arch/arm/mach-s5pv210/dev-spi.c b/arch/arm/mach-s5pv210/dev-spi.c index e3249a47e3b1..eaf9a7bff7a0 100644 --- a/arch/arm/mach-s5pv210/dev-spi.c +++ b/arch/arm/mach-s5pv210/dev-spi.c | |||
| @@ -85,6 +85,7 @@ static struct s3c64xx_spi_info s5pv210_spi0_pdata = { | |||
| 85 | .fifo_lvl_mask = 0x1ff, | 85 | .fifo_lvl_mask = 0x1ff, |
| 86 | .rx_lvl_offset = 15, | 86 | .rx_lvl_offset = 15, |
| 87 | .high_speed = 1, | 87 | .high_speed = 1, |
| 88 | .tx_st_done = 25, | ||
| 88 | }; | 89 | }; |
| 89 | 90 | ||
| 90 | static u64 spi_dmamask = DMA_BIT_MASK(32); | 91 | static u64 spi_dmamask = DMA_BIT_MASK(32); |
| @@ -129,6 +130,7 @@ static struct s3c64xx_spi_info s5pv210_spi1_pdata = { | |||
| 129 | .fifo_lvl_mask = 0x7f, | 130 | .fifo_lvl_mask = 0x7f, |
| 130 | .rx_lvl_offset = 15, | 131 | .rx_lvl_offset = 15, |
| 131 | .high_speed = 1, | 132 | .high_speed = 1, |
| 133 | .tx_st_done = 25, | ||
| 132 | }; | 134 | }; |
| 133 | 135 | ||
| 134 | struct platform_device s5pv210_device_spi1 = { | 136 | struct platform_device s5pv210_device_spi1 = { |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 2abf9660bc6c..a79a8ccd25f6 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
| @@ -1027,17 +1027,13 @@ int s3c2410_dma_config(unsigned int channel, | |||
| 1027 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); | 1027 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); |
| 1028 | unsigned int dcon; | 1028 | unsigned int dcon; |
| 1029 | 1029 | ||
| 1030 | pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", | 1030 | pr_debug("%s: chan=%d, xfer_unit=%d\n", __func__, channel, xferunit); |
| 1031 | __func__, channel, xferunit, dcon); | ||
| 1032 | 1031 | ||
| 1033 | if (chan == NULL) | 1032 | if (chan == NULL) |
| 1034 | return -EINVAL; | 1033 | return -EINVAL; |
| 1035 | 1034 | ||
| 1036 | pr_debug("%s: Initial dcon is %08x\n", __func__, dcon); | ||
| 1037 | |||
| 1038 | dcon = chan->dcon & dma_sel.dcon_mask; | 1035 | dcon = chan->dcon & dma_sel.dcon_mask; |
| 1039 | 1036 | pr_debug("%s: dcon is %08x\n", __func__, dcon); | |
| 1040 | pr_debug("%s: New dcon is %08x\n", __func__, dcon); | ||
| 1041 | 1037 | ||
| 1042 | switch (chan->req_ch) { | 1038 | switch (chan->req_ch) { |
| 1043 | case DMACH_I2S_IN: | 1039 | case DMACH_I2S_IN: |
| @@ -1235,7 +1231,7 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp) | |||
| 1235 | /* restore channel's hardware configuration */ | 1231 | /* restore channel's hardware configuration */ |
| 1236 | 1232 | ||
| 1237 | if (!cp->in_use) | 1233 | if (!cp->in_use) |
| 1238 | return 0; | 1234 | return; |
| 1239 | 1235 | ||
| 1240 | printk(KERN_INFO "dma%d: restoring configuration\n", cp->number); | 1236 | printk(KERN_INFO "dma%d: restoring configuration\n", cp->number); |
| 1241 | 1237 | ||
| @@ -1246,8 +1242,6 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp) | |||
| 1246 | 1242 | ||
| 1247 | if (cp->map != NULL) | 1243 | if (cp->map != NULL) |
| 1248 | dma_sel.select(cp, cp->map); | 1244 | dma_sel.select(cp, cp->map); |
| 1249 | |||
| 1250 | return 0; | ||
| 1251 | } | 1245 | } |
| 1252 | 1246 | ||
| 1253 | static void s3c2410_dma_resume(void) | 1247 | static void s3c2410_dma_resume(void) |
diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c index 899a8cc011ff..612934c48b0d 100644 --- a/arch/arm/plat-s5p/s5p-time.c +++ b/arch/arm/plat-s5p/s5p-time.c | |||
| @@ -370,11 +370,11 @@ static void __init s5p_clocksource_init(void) | |||
| 370 | 370 | ||
| 371 | clock_rate = clk_get_rate(tin_source); | 371 | clock_rate = clk_get_rate(tin_source); |
| 372 | 372 | ||
| 373 | init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); | ||
| 374 | |||
| 375 | s5p_time_setup(timer_source.source_id, TCNT_MAX); | 373 | s5p_time_setup(timer_source.source_id, TCNT_MAX); |
| 376 | s5p_time_start(timer_source.source_id, PERIODIC); | 374 | s5p_time_start(timer_source.source_id, PERIODIC); |
| 377 | 375 | ||
| 376 | init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); | ||
| 377 | |||
| 378 | if (clocksource_register_hz(&time_clocksource, clock_rate)) | 378 | if (clocksource_register_hz(&time_clocksource, clock_rate)) |
| 379 | panic("%s: can't register clocksource\n", time_clocksource.name); | 379 | panic("%s: can't register clocksource\n", time_clocksource.name); |
| 380 | } | 380 | } |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 4af108ff4112..e3b31c26ac3e 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
| @@ -12,6 +12,10 @@ | |||
| 12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
| 14 | */ | 14 | */ |
| 15 | |||
| 16 | #ifndef __PLAT_DEVS_H | ||
| 17 | #define __PLAT_DEVS_H __FILE__ | ||
| 18 | |||
| 15 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
| 16 | 20 | ||
| 17 | struct s3c24xx_uart_resources { | 21 | struct s3c24xx_uart_resources { |
| @@ -159,3 +163,5 @@ extern struct platform_device s3c_device_ac97; | |||
| 159 | */ | 163 | */ |
| 160 | extern void *s3c_set_platdata(void *pd, size_t pdsize, | 164 | extern void *s3c_set_platdata(void *pd, size_t pdsize, |
| 161 | struct platform_device *pdev); | 165 | struct platform_device *pdev); |
| 166 | |||
| 167 | #endif /* __PLAT_DEVS_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h index 0ffe34a21554..4c16fa3621bb 100644 --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | |||
| @@ -39,6 +39,7 @@ struct s3c64xx_spi_csinfo { | |||
| 39 | * @fifo_lvl_mask: All tx fifo_lvl fields start at offset-6 | 39 | * @fifo_lvl_mask: All tx fifo_lvl fields start at offset-6 |
| 40 | * @rx_lvl_offset: Depends on tx fifo_lvl field and bus number | 40 | * @rx_lvl_offset: Depends on tx fifo_lvl field and bus number |
| 41 | * @high_speed: If the controller supports HIGH_SPEED_EN bit | 41 | * @high_speed: If the controller supports HIGH_SPEED_EN bit |
| 42 | * @tx_st_done: Depends on tx fifo_lvl field | ||
| 42 | */ | 43 | */ |
| 43 | struct s3c64xx_spi_info { | 44 | struct s3c64xx_spi_info { |
| 44 | int src_clk_nr; | 45 | int src_clk_nr; |
| @@ -53,6 +54,7 @@ struct s3c64xx_spi_info { | |||
| 53 | int fifo_lvl_mask; | 54 | int fifo_lvl_mask; |
| 54 | int rx_lvl_offset; | 55 | int rx_lvl_offset; |
| 55 | int high_speed; | 56 | int high_speed; |
| 57 | int tx_st_done; | ||
| 56 | }; | 58 | }; |
| 57 | 59 | ||
| 58 | /** | 60 | /** |
diff --git a/drivers/spi/spi_s3c64xx.c b/drivers/spi/spi_s3c64xx.c index 795828b90f45..8945e201e42e 100644 --- a/drivers/spi/spi_s3c64xx.c +++ b/drivers/spi/spi_s3c64xx.c | |||
| @@ -116,9 +116,7 @@ | |||
| 116 | (((i)->fifo_lvl_mask + 1))) \ | 116 | (((i)->fifo_lvl_mask + 1))) \ |
| 117 | ? 1 : 0) | 117 | ? 1 : 0) |
| 118 | 118 | ||
| 119 | #define S3C64XX_SPI_ST_TX_DONE(v, i) ((((v) >> (i)->rx_lvl_offset) & \ | 119 | #define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & (1 << (i)->tx_st_done)) ? 1 : 0) |
| 120 | (((i)->fifo_lvl_mask + 1) << 1)) \ | ||
| 121 | ? 1 : 0) | ||
| 122 | #define TX_FIFO_LVL(v, i) (((v) >> 6) & (i)->fifo_lvl_mask) | 120 | #define TX_FIFO_LVL(v, i) (((v) >> 6) & (i)->fifo_lvl_mask) |
| 123 | #define RX_FIFO_LVL(v, i) (((v) >> (i)->rx_lvl_offset) & (i)->fifo_lvl_mask) | 121 | #define RX_FIFO_LVL(v, i) (((v) >> (i)->rx_lvl_offset) & (i)->fifo_lvl_mask) |
| 124 | 122 | ||
