diff options
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r-- | arch/avr32/boards/atngw100/flash.c | 5 | ||||
-rw-r--r-- | arch/avr32/boards/atngw100/setup.c | 14 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 1 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/flash.c | 5 |
4 files changed, 19 insertions, 6 deletions
diff --git a/arch/avr32/boards/atngw100/flash.c b/arch/avr32/boards/atngw100/flash.c index f9b32a8eab9b..b07ae63aa548 100644 --- a/arch/avr32/boards/atngw100/flash.c +++ b/arch/avr32/boards/atngw100/flash.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/arch/smc.h> | 16 | #include <asm/arch/smc.h> |
17 | 17 | ||
18 | static struct smc_config flash_config __initdata = { | 18 | static struct smc_timing flash_timing __initdata = { |
19 | .ncs_read_setup = 0, | 19 | .ncs_read_setup = 0, |
20 | .nrd_setup = 40, | 20 | .nrd_setup = 40, |
21 | .ncs_write_setup = 0, | 21 | .ncs_write_setup = 0, |
@@ -28,7 +28,9 @@ static struct smc_config flash_config __initdata = { | |||
28 | 28 | ||
29 | .read_cycle = 120, | 29 | .read_cycle = 120, |
30 | .write_cycle = 120, | 30 | .write_cycle = 120, |
31 | }; | ||
31 | 32 | ||
33 | static struct smc_config flash_config __initdata = { | ||
32 | .bus_width = 2, | 34 | .bus_width = 2, |
33 | .nrd_controlled = 1, | 35 | .nrd_controlled = 1, |
34 | .nwe_controlled = 1, | 36 | .nwe_controlled = 1, |
@@ -82,6 +84,7 @@ static int __init atngw100_flash_init(void) | |||
82 | { | 84 | { |
83 | int ret; | 85 | int ret; |
84 | 86 | ||
87 | smc_set_timing(&flash_config, &flash_timing); | ||
85 | ret = smc_set_configuration(0, &flash_config); | 88 | ret = smc_set_configuration(0, &flash_config); |
86 | if (ret < 0) { | 89 | if (ret < 0) { |
87 | printk(KERN_ERR "atngw100: failed to set NOR flash timing\n"); | 90 | printk(KERN_ERR "atngw100: failed to set NOR flash timing\n"); |
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index ef801563bbf5..52987c81d668 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c | |||
@@ -125,8 +125,11 @@ static struct platform_device ngw_gpio_leds = { | |||
125 | }; | 125 | }; |
126 | 126 | ||
127 | static struct i2c_gpio_platform_data i2c_gpio_data = { | 127 | static struct i2c_gpio_platform_data i2c_gpio_data = { |
128 | .sda_pin = GPIO_PIN_PA(6), | 128 | .sda_pin = GPIO_PIN_PA(6), |
129 | .scl_pin = GPIO_PIN_PA(7), | 129 | .scl_pin = GPIO_PIN_PA(7), |
130 | .sda_is_open_drain = 1, | ||
131 | .scl_is_open_drain = 1, | ||
132 | .udelay = 2, /* close to 100 kHz */ | ||
130 | }; | 133 | }; |
131 | 134 | ||
132 | static struct platform_device i2c_gpio_device = { | 135 | static struct platform_device i2c_gpio_device = { |
@@ -154,6 +157,7 @@ static int __init atngw100_init(void) | |||
154 | set_hw_addr(at32_add_device_eth(1, ð_data[1])); | 157 | set_hw_addr(at32_add_device_eth(1, ð_data[1])); |
155 | 158 | ||
156 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); | 159 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); |
160 | at32_add_device_usba(0, NULL); | ||
157 | 161 | ||
158 | for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { | 162 | for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { |
159 | at32_select_gpio(ngw_leds[i].gpio, | 163 | at32_select_gpio(ngw_leds[i].gpio, |
@@ -161,8 +165,10 @@ static int __init atngw100_init(void) | |||
161 | } | 165 | } |
162 | platform_device_register(&ngw_gpio_leds); | 166 | platform_device_register(&ngw_gpio_leds); |
163 | 167 | ||
164 | at32_select_gpio(i2c_gpio_data.sda_pin, 0); | 168 | at32_select_gpio(i2c_gpio_data.sda_pin, |
165 | at32_select_gpio(i2c_gpio_data.scl_pin, 0); | 169 | AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); |
170 | at32_select_gpio(i2c_gpio_data.scl_pin, | ||
171 | AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); | ||
166 | platform_device_register(&i2c_gpio_device); | 172 | platform_device_register(&i2c_gpio_device); |
167 | 173 | ||
168 | return 0; | 174 | return 0; |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index c9981b731efa..6b9e466104ad 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -241,6 +241,7 @@ static int __init atstk1002_init(void) | |||
241 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, | 241 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, |
242 | fbmem_start, fbmem_size); | 242 | fbmem_start, fbmem_size); |
243 | #endif | 243 | #endif |
244 | at32_add_device_usba(0, NULL); | ||
244 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM | 245 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM |
245 | at32_add_device_ssc(0, ATMEL_SSC_TX); | 246 | at32_add_device_ssc(0, ATMEL_SSC_TX); |
246 | #endif | 247 | #endif |
diff --git a/arch/avr32/boards/atstk1000/flash.c b/arch/avr32/boards/atstk1000/flash.c index aac4300cca12..3d0a102ad45e 100644 --- a/arch/avr32/boards/atstk1000/flash.c +++ b/arch/avr32/boards/atstk1000/flash.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/arch/smc.h> | 16 | #include <asm/arch/smc.h> |
17 | 17 | ||
18 | static struct smc_config flash_config __initdata = { | 18 | static struct smc_timing flash_timing __initdata = { |
19 | .ncs_read_setup = 0, | 19 | .ncs_read_setup = 0, |
20 | .nrd_setup = 40, | 20 | .nrd_setup = 40, |
21 | .ncs_write_setup = 0, | 21 | .ncs_write_setup = 0, |
@@ -28,7 +28,9 @@ static struct smc_config flash_config __initdata = { | |||
28 | 28 | ||
29 | .read_cycle = 120, | 29 | .read_cycle = 120, |
30 | .write_cycle = 120, | 30 | .write_cycle = 120, |
31 | }; | ||
31 | 32 | ||
33 | static struct smc_config flash_config __initdata = { | ||
32 | .bus_width = 2, | 34 | .bus_width = 2, |
33 | .nrd_controlled = 1, | 35 | .nrd_controlled = 1, |
34 | .nwe_controlled = 1, | 36 | .nwe_controlled = 1, |
@@ -82,6 +84,7 @@ static int __init atstk1000_flash_init(void) | |||
82 | { | 84 | { |
83 | int ret; | 85 | int ret; |
84 | 86 | ||
87 | smc_set_timing(&flash_config, &flash_timing); | ||
85 | ret = smc_set_configuration(0, &flash_config); | 88 | ret = smc_set_configuration(0, &flash_config); |
86 | if (ret < 0) { | 89 | if (ret < 0) { |
87 | printk(KERN_ERR "atstk1000: failed to set NOR flash timing\n"); | 90 | printk(KERN_ERR "atstk1000: failed to set NOR flash timing\n"); |