foxg20.patch 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. diff -Nur linux-2.6.32.2.orig/arch/arm/include/asm/setup.h linux-2.6.32.2/arch/arm/include/asm/setup.h
  2. --- linux-2.6.32.2.orig/arch/arm/include/asm/setup.h 2009-12-18 23:27:07.000000000 +0100
  3. +++ linux-2.6.32.2/arch/arm/include/asm/setup.h 2010-02-23 21:40:33.000000000 +0100
  4. @@ -18,6 +18,8 @@
  5. #define COMMAND_LINE_SIZE 1024
  6. +const char *get_system_type(void);
  7. +
  8. /* The list ends with an ATAG_NONE node. */
  9. #define ATAG_NONE 0x00000000
  10. diff -Nur linux-2.6.32.2.orig/arch/arm/Kconfig linux-2.6.32.2/arch/arm/Kconfig
  11. --- linux-2.6.32.2.orig/arch/arm/Kconfig 2009-12-18 23:27:07.000000000 +0100
  12. +++ linux-2.6.32.2/arch/arm/Kconfig 2010-02-23 21:18:53.000000000 +0100
  13. @@ -18,6 +18,9 @@
  14. select HAVE_KRETPROBES if (HAVE_KPROBES)
  15. select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
  16. select HAVE_GENERIC_DMA_COHERENT
  17. + select HAVE_KERNEL_GZIP
  18. + select HAVE_KERNEL_BZIP2
  19. + select HAVE_KERNEL_LZMA
  20. help
  21. The ARM series is a line of low-power-consumption RISC chip designs
  22. licensed by ARM Ltd and targeted at embedded applications and
  23. diff -Nur linux-2.6.32.2.orig/arch/arm/kernel/setup.c linux-2.6.32.2/arch/arm/kernel/setup.c
  24. --- linux-2.6.32.2.orig/arch/arm/kernel/setup.c 2009-12-18 23:27:07.000000000 +0100
  25. +++ linux-2.6.32.2/arch/arm/kernel/setup.c 2010-02-23 21:29:01.000000000 +0100
  26. @@ -806,8 +806,12 @@
  27. static int c_show(struct seq_file *m, void *v)
  28. {
  29. + unsigned long n = (unsigned long) v - 1;
  30. int i;
  31. + if (n == 0)
  32. + seq_printf(m, "system type\t\t: %s\n", get_system_type());
  33. +
  34. seq_printf(m, "Processor\t: %s rev %d (%s)\n",
  35. cpu_name, read_cpuid_id() & 15, elf_platform);
  36. diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6.32.2/arch/arm/mach-at91/at91sam9260_devices.c
  37. --- linux-2.6.32.2.orig/arch/arm/mach-at91/at91sam9260_devices.c 2009-12-18 23:27:07.000000000 +0100
  38. +++ linux-2.6.32.2/arch/arm/mach-at91/at91sam9260_devices.c 2010-02-23 21:18:53.000000000 +0100
  39. @@ -454,7 +454,15 @@
  40. .sda_is_open_drain = 1,
  41. .scl_pin = AT91_PIN_PA24,
  42. .scl_is_open_drain = 1,
  43. +#if defined(CONFIG_MACH_FOXG20)
  44. + /* Some I2C devices are limited to 100 kHz and i2c-gpio.h
  45. + * says "frequency is (500 / udelay) kHz" so 5 is best (and is
  46. + * used in i2c-gpio.c)
  47. + */
  48. + .udelay = 5, /* ~100 kHz */
  49. +#else
  50. .udelay = 2, /* ~100 kHz */
  51. +#endif
  52. };
  53. static struct platform_device at91sam9260_twi_device = {
  54. diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c linux-2.6.32.2/arch/arm/mach-at91/board-foxg20.c
  55. --- linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c 1970-01-01 01:00:00.000000000 +0100
  56. +++ linux-2.6.32.2/arch/arm/mach-at91/board-foxg20.c 2010-02-23 21:33:34.000000000 +0100
  57. @@ -0,0 +1,376 @@
  58. +/*
  59. + * Copyright (C) 2005 SAN People
  60. + * Copyright (C) 2008 Atmel
  61. + * Copyright (C) 2010 Lee McLoughlin - lee@lmmrtech.com
  62. + *
  63. + * This program is free software; you can redistribute it and/or modify
  64. + * it under the terms of the GNU General Public License as published by
  65. + * the Free Software Foundation; either version 2 of the License, or
  66. + * (at your option) any later version.
  67. + *
  68. + * This program is distributed in the hope that it will be useful,
  69. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  70. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  71. + * GNU General Public License for more details.
  72. + *
  73. + * You should have received a copy of the GNU General Public License
  74. + * along with this program; if not, write to the Free Software
  75. + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  76. + */
  77. +
  78. +#include <linux/types.h>
  79. +#include <linux/init.h>
  80. +#include <linux/mm.h>
  81. +#include <linux/module.h>
  82. +#include <linux/platform_device.h>
  83. +#include <linux/spi/spi.h>
  84. +#include <linux/spi/at73c213.h>
  85. +#include <linux/gpio_keys.h>
  86. +#include <linux/input.h>
  87. +#include <linux/clk.h>
  88. +#include <linux/w1-gpio.h>
  89. +
  90. +#include <mach/hardware.h>
  91. +#include <asm/setup.h>
  92. +#include <asm/mach-types.h>
  93. +#include <asm/irq.h>
  94. +
  95. +#include <asm/mach/arch.h>
  96. +#include <asm/mach/map.h>
  97. +#include <asm/mach/irq.h>
  98. +
  99. +#include <mach/board.h>
  100. +#include <mach/gpio.h>
  101. +#include <mach/at91sam9_smc.h>
  102. +
  103. +#include "sam9_smc.h"
  104. +#include "generic.h"
  105. +
  106. +/*
  107. + * The FOX hardware comes as the "Netus" board with just the cpu, ram,
  108. + * dataflash and two header connectors. This is plugged into the Fox board
  109. + * which provides the ethernet, usb, rtc, leds, switch, ...
  110. + * Other version of the Fox board are planned which could contain
  111. + * both NAND and sound (WM8731).
  112. + *
  113. + * By default USART4 and USART5 are not enabled (freeing up those pins
  114. + * for general use)
  115. + *
  116. + * Note: Enabling the NAND without a NAND device present doesn't cause
  117. + * any issues as on boot the probe will fail.
  118. + */
  119. +/* #define FOXG20_NAND */
  120. +/* #define FOXG20_WM8731 */
  121. +/* #define FOX_USART4 */
  122. +/* #define FOX_USART5 */
  123. +
  124. +const char *get_system_type(void)
  125. +{
  126. + return "FoxBoard FOXG20";
  127. +}
  128. +
  129. +static void __init foxg20_map_io(void)
  130. +{
  131. + /* Initialize processor: 18.432 MHz crystal */
  132. + at91sam9260_initialize(18432000);
  133. +
  134. + /* DBGU on ttyS0. (Rx & Tx only) */
  135. + at91_register_uart(0, 0, 0);
  136. +
  137. + /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
  138. + at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
  139. + | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
  140. + | ATMEL_UART_RI);
  141. +
  142. + /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
  143. + at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
  144. +
  145. + /* USART2 on ttyS3. (Rx & Tx only) */
  146. + at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
  147. +
  148. + /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
  149. + at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_CTS | ATMEL_UART_RTS);
  150. +
  151. +#if defined(FOX_USART4)
  152. + /* USART4 on ttyS5. (Rx & Tx only) */
  153. + at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
  154. +#endif
  155. +
  156. +#if defined(FOX_USART5)
  157. + /* USART5 on ttyS6. (Rx & Tx only) */
  158. + at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
  159. +#endif
  160. +
  161. + /* set serial console to ttyS0 (ie, DBGU) */
  162. + at91_set_serial_console(0);
  163. +}
  164. +
  165. +static void __init foxg20_init_irq(void)
  166. +{
  167. + at91sam9260_init_interrupts(NULL);
  168. +}
  169. +
  170. +
  171. +/*
  172. + * USB Host port
  173. + */
  174. +static struct at91_usbh_data __initdata foxg20_usbh_data = {
  175. + .ports = 2,
  176. +};
  177. +
  178. +/*
  179. + * USB Device port
  180. + */
  181. +static struct at91_udc_data __initdata foxg20_udc_data = {
  182. + .vbus_pin = AT91_PIN_PC6,
  183. + .pullup_pin = 0, /* pull-up driven by UDC */
  184. +};
  185. +
  186. +
  187. +/*
  188. + * SPI devices.
  189. + */
  190. +static struct spi_board_info foxg20_spi_devices[] = {
  191. +#if !defined(CONFIG_MMC_AT91)
  192. + {
  193. + .modalias = "mtd_dataflash",
  194. + .chip_select = 1,
  195. + .max_speed_hz = 15 * 1000 * 1000,
  196. + .bus_num = 0,
  197. + },
  198. +#endif
  199. +};
  200. +
  201. +
  202. +/*
  203. + * MACB Ethernet device
  204. + */
  205. +static struct at91_eth_data __initdata foxg20_macb_data = {
  206. + .phy_irq_pin = AT91_PIN_PA7,
  207. + .is_rmii = 1,
  208. +};
  209. +
  210. +
  211. +#ifdef FOXG20_NAND
  212. +/* The Fox doesn't have NAND memory */
  213. +/*
  214. + * NAND flash
  215. + */
  216. +static struct mtd_partition __initdata foxg20_nand_partition[] = {
  217. + {
  218. + .name = "Bootstrap",
  219. + .offset = 0,
  220. + .size = 4 * SZ_1M,
  221. + },
  222. + {
  223. + .name = "Partition 1",
  224. + .offset = MTDPART_OFS_NXTBLK,
  225. + .size = 60 * SZ_1M,
  226. + },
  227. + {
  228. + .name = "Partition 2",
  229. + .offset = MTDPART_OFS_NXTBLK,
  230. + .size = MTDPART_SIZ_FULL,
  231. + },
  232. +};
  233. +
  234. +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
  235. +{
  236. + *num_partitions = ARRAY_SIZE(foxg20_nand_partition);
  237. + return foxg20_nand_partition;
  238. +}
  239. +
  240. +/* det_pin is not connected */
  241. +static struct atmel_nand_data __initdata foxg20_nand_data = {
  242. + .ale = 21,
  243. + .cle = 22,
  244. + .rdy_pin = AT91_PIN_PC13,
  245. + .enable_pin = AT91_PIN_PC14,
  246. + .partition_info = nand_partitions,
  247. +#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
  248. + .bus_width_16 = 1,
  249. +#else
  250. + .bus_width_16 = 0,
  251. +#endif
  252. +};
  253. +
  254. +static struct sam9_smc_config __initdata foxg20_nand_smc_config = {
  255. + .ncs_read_setup = 0,
  256. + .nrd_setup = 2,
  257. + .ncs_write_setup = 0,
  258. + .nwe_setup = 2,
  259. +
  260. + .ncs_read_pulse = 4,
  261. + .nrd_pulse = 4,
  262. + .ncs_write_pulse = 4,
  263. + .nwe_pulse = 4,
  264. +
  265. + .read_cycle = 7,
  266. + .write_cycle = 7,
  267. +
  268. + .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
  269. + .tdf_cycles = 3,
  270. +};
  271. +
  272. +static void __init foxg20_add_device_nand(void)
  273. +{
  274. + /* setup bus-width (8 or 16) */
  275. + if (foxg20_nand_data.bus_width_16)
  276. + foxg20_nand_smc_config.mode |= AT91_SMC_DBW_16;
  277. + else
  278. + foxg20_nand_smc_config.mode |= AT91_SMC_DBW_8;
  279. +
  280. + /* configure chip-select 3 (NAND) */
  281. + sam9_smc_configure(3, &foxg20_nand_smc_config);
  282. +
  283. + at91_add_device_nand(&foxg20_nand_data);
  284. +}
  285. +#endif
  286. +
  287. +
  288. +/*
  289. + * MCI (SD/MMC)
  290. + * det_pin, wp_pin and vcc_pin are not connected
  291. + */
  292. +static struct at91_mmc_data __initdata foxg20_mmc_data = {
  293. + .slot_b = 1,
  294. + .wire4 = 1,
  295. +};
  296. +
  297. +
  298. +/*
  299. + * LEDs
  300. + */
  301. +static struct gpio_led foxg20_leds[] = {
  302. + { /* user led, red */
  303. + .name = "user_led",
  304. + .gpio = AT91_PIN_PC7,
  305. + .active_low = 0,
  306. + .default_trigger = "heartbeat",
  307. + },
  308. +};
  309. +
  310. +
  311. +/*
  312. + * GPIO Buttons
  313. + */
  314. +#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  315. +static struct gpio_keys_button foxg20_buttons[] = {
  316. + {
  317. + .gpio = AT91_PIN_PC4,
  318. + .code = BTN_1,
  319. + .desc = "Button 1",
  320. + .active_low = 1,
  321. + .wakeup = 1,
  322. + },
  323. +};
  324. +
  325. +static struct gpio_keys_platform_data foxg20_button_data = {
  326. + .buttons = foxg20_buttons,
  327. + .nbuttons = ARRAY_SIZE(foxg20_buttons),
  328. +};
  329. +
  330. +static struct platform_device foxg20_button_device = {
  331. + .name = "gpio-keys",
  332. + .id = -1,
  333. + .num_resources = 0,
  334. + .dev = {
  335. + .platform_data = &foxg20_button_data,
  336. + }
  337. +};
  338. +
  339. +static void __init foxg20_add_device_buttons(void)
  340. +{
  341. + at91_set_gpio_input(AT91_PIN_PC4, 1); /* btn1 */
  342. + at91_set_deglitch(AT91_PIN_PC4, 1);
  343. +
  344. + platform_device_register(&foxg20_button_device);
  345. +}
  346. +#else
  347. +static void __init foxg20_add_device_buttons(void) {}
  348. +#endif
  349. +
  350. +
  351. +#if !defined(FOXG20_WM8731)
  352. +#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
  353. +static struct w1_gpio_platform_data w1_gpio_pdata = {
  354. + /* If you choose to use a pin other than PB16 it needs to be 3.3V */
  355. + .pin = AT91_PIN_PB16,
  356. + .is_open_drain = 1,
  357. +};
  358. +
  359. +static struct platform_device w1_device = {
  360. + .name = "w1-gpio",
  361. + .id = -1,
  362. + .dev.platform_data = &w1_gpio_pdata,
  363. +};
  364. +
  365. +static void __init at91_add_device_w1(void)
  366. +{
  367. + at91_set_GPIO_periph(w1_gpio_pdata.pin, 1);
  368. + at91_set_multi_drive(w1_gpio_pdata.pin, 1);
  369. + platform_device_register(&w1_device);
  370. +}
  371. +
  372. +#endif
  373. +#endif
  374. +
  375. +
  376. +static struct i2c_board_info __initdata foxg20_i2c_devices[] = {
  377. + {
  378. + I2C_BOARD_INFO("24c512", 0x50),
  379. +#ifdef FOXG20_WM8731
  380. + I2C_BOARD_INFO("wm8731", 0x1b),
  381. +#endif
  382. + },
  383. +};
  384. +
  385. +
  386. +static void __init foxg20_board_init(void)
  387. +{
  388. + /* Serial */
  389. + at91_add_device_serial();
  390. + /* USB Host */
  391. + at91_add_device_usbh(&foxg20_usbh_data);
  392. + /* USB Device */
  393. + at91_add_device_udc(&foxg20_udc_data);
  394. + /* SPI */
  395. + at91_add_device_spi(foxg20_spi_devices, ARRAY_SIZE(foxg20_spi_devices));
  396. +#ifdef FOXG20_NAND
  397. + /* The Fox doesn't have NAND memory */
  398. + /* NAND */
  399. + foxg20_add_device_nand();
  400. +#endif
  401. + /* Ethernet */
  402. + at91_add_device_eth(&foxg20_macb_data);
  403. + /* MMC */
  404. + at91_add_device_mmc(0, &foxg20_mmc_data);
  405. + /* I2C */
  406. + at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
  407. + /* LEDs */
  408. + at91_gpio_leds(foxg20_leds, ARRAY_SIZE(foxg20_leds));
  409. + /* Push Buttons */
  410. + foxg20_add_device_buttons();
  411. +#ifdef FOXG20_WM8731
  412. + /* The Fox doesn't have this sound chip */
  413. + /* PCK0 provides MCLK to the WM8731 */
  414. + at91_set_B_periph(AT91_PIN_PC1, 0);
  415. + /* SSC (for WM8731) */
  416. + at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
  417. +#else
  418. +#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
  419. + at91_add_device_w1();
  420. +#endif
  421. +#endif
  422. +}
  423. +
  424. +MACHINE_START(AT91SAM9G20EK, "Acme Systems FOXG20")
  425. + /* Maintainer: Lee McLoughlin */
  426. + .phys_io = AT91_BASE_SYS,
  427. + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
  428. + .boot_params = AT91_SDRAM_BASE + 0x100,
  429. + .timer = &at91sam926x_timer,
  430. + .map_io = foxg20_map_io,
  431. + .init_irq = foxg20_init_irq,
  432. + .init_machine = foxg20_board_init,
  433. +MACHINE_END
  434. diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Kconfig linux-2.6.32.2/arch/arm/mach-at91/Kconfig
  435. --- linux-2.6.32.2.orig/arch/arm/mach-at91/Kconfig 2009-12-18 23:27:07.000000000 +0100
  436. +++ linux-2.6.32.2/arch/arm/mach-at91/Kconfig 2010-02-23 21:18:53.000000000 +0100
  437. @@ -333,6 +333,13 @@
  438. Select this if you are using a Eukrea Electromatique's
  439. CPU9G20 Board <http://www.eukrea.com/>
  440. +config MACH_FOXG20
  441. + bool "Acme Systems FOX G20"
  442. + depends on ARCH_AT91SAM9G20
  443. + help
  444. + Select this if you are using Acme Systems
  445. + FOX Board G20 <http://netus.acmesystems.it>
  446. +
  447. endif
  448. # ----------------------------------------------------------
  449. @@ -388,13 +395,13 @@
  450. config MTD_AT91_DATAFLASH_CARD
  451. bool "Enable DataFlash Card support"
  452. - depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926)
  453. + depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926 || MACH_FOXG20)
  454. help
  455. Enable support for the DataFlash card.
  456. config MTD_NAND_ATMEL_BUSWIDTH_16
  457. bool "Enable 16-bit data bus interface to NAND flash"
  458. - depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G20EK_2MMC || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK)
  459. + depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G20EK_2MMC || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK || MACH_FOXG20)
  460. help
  461. On AT91SAM926x boards both types of NAND flash can be present
  462. (8 and 16 bit data bus width).
  463. diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Makefile linux-2.6.32.2/arch/arm/mach-at91/Makefile
  464. --- linux-2.6.32.2.orig/arch/arm/mach-at91/Makefile 2009-12-18 23:27:07.000000000 +0100
  465. +++ linux-2.6.32.2/arch/arm/mach-at91/Makefile 2010-02-23 21:18:53.000000000 +0100
  466. @@ -65,6 +65,9 @@
  467. # AT91SAM9G45 board-specific support
  468. obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o
  469. +# FOXG20 board-specific support
  470. +obj-$(CONFIG_MACH_FOXG20) += board-foxg20.o
  471. +
  472. # AT91CAP9 board-specific support
  473. obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o
  474. diff -Nur linux-2.6.32.2.orig/drivers/mmc/host/at91_mci.c linux-2.6.32.2/drivers/mmc/host/at91_mci.c
  475. --- linux-2.6.32.2.orig/drivers/mmc/host/at91_mci.c 2009-12-18 23:27:07.000000000 +0100
  476. +++ linux-2.6.32.2/drivers/mmc/host/at91_mci.c 2010-02-23 21:18:53.000000000 +0100
  477. @@ -461,7 +461,7 @@
  478. at91_mci_write(host, AT91_MCI_DTOR, AT91_MCI_DTOMUL_1M | AT91_MCI_DTOCYC);
  479. mr = AT91_MCI_PDCMODE | 0x34a;
  480. - if (cpu_is_at91sam9260() || cpu_is_at91sam9263())
  481. + if (cpu_is_at91sam9260() || cpu_is_at91sam9263() || cpu_is_at91sam9g20())
  482. mr |= AT91_MCI_RDPROOF | AT91_MCI_WRPROOF;
  483. at91_mci_write(host, AT91_MCI_MR, mr);
  484. @@ -1017,7 +1017,7 @@
  485. host->bus_mode = 0;
  486. host->board = pdev->dev.platform_data;
  487. if (host->board->wire4) {
  488. - if (cpu_is_at91sam9260() || cpu_is_at91sam9263())
  489. + if (cpu_is_at91sam9260() || cpu_is_at91sam9263() || cpu_is_at91sam9g20())
  490. mmc->caps |= MMC_CAP_4_BIT_DATA;
  491. else
  492. dev_warn(&pdev->dev, "4 wire bus mode not supported"