db1200.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) db1200.c (47bd59e538d4e7b3ad9c18bef5c1052657bdff59)
1/*
2 * DBAu1200/PBAu1200 board platform device registration
3 *
4 * Copyright (C) 2008-2011 Manuel Lauss
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 183 unchanged lines hidden (view full) ---

192static struct i2c_board_info db1200_i2c_devs[] __initdata = {
193 { I2C_BOARD_INFO("24c04", 0x52), }, /* AT24C04-10 I2C eeprom */
194 { I2C_BOARD_INFO("ne1619", 0x2d), }, /* adm1025-compat hwmon */
195 { I2C_BOARD_INFO("wm8731", 0x1b), }, /* I2S audio codec WM8731 */
196};
197
198/**********************************************************************/
199
1/*
2 * DBAu1200/PBAu1200 board platform device registration
3 *
4 * Copyright (C) 2008-2011 Manuel Lauss
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 183 unchanged lines hidden (view full) ---

192static struct i2c_board_info db1200_i2c_devs[] __initdata = {
193 { I2C_BOARD_INFO("24c04", 0x52), }, /* AT24C04-10 I2C eeprom */
194 { I2C_BOARD_INFO("ne1619", 0x2d), }, /* adm1025-compat hwmon */
195 { I2C_BOARD_INFO("wm8731", 0x1b), }, /* I2S audio codec WM8731 */
196};
197
198/**********************************************************************/
199
200static void au1200_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
200static void au1200_nand_cmd_ctrl(struct nand_chip *this, int cmd,
201 unsigned int ctrl)
202{
201 unsigned int ctrl)
202{
203 struct nand_chip *this = mtd_to_nand(mtd);
204 unsigned long ioaddr = (unsigned long)this->IO_ADDR_W;
205
206 ioaddr &= 0xffffff00;
207
208 if (ctrl & NAND_CLE) {
209 ioaddr += MEM_STNAND_CMD;
210 } else if (ctrl & NAND_ALE) {
211 ioaddr += MEM_STNAND_ADDR;
212 } else {
213 /* assume we want to r/w real data by default */
214 ioaddr += MEM_STNAND_DATA;
215 }
216 this->IO_ADDR_R = this->IO_ADDR_W = (void __iomem *)ioaddr;
217 if (cmd != NAND_CMD_NONE) {
218 __raw_writeb(cmd, this->IO_ADDR_W);
219 wmb();
220 }
221}
222
203 unsigned long ioaddr = (unsigned long)this->IO_ADDR_W;
204
205 ioaddr &= 0xffffff00;
206
207 if (ctrl & NAND_CLE) {
208 ioaddr += MEM_STNAND_CMD;
209 } else if (ctrl & NAND_ALE) {
210 ioaddr += MEM_STNAND_ADDR;
211 } else {
212 /* assume we want to r/w real data by default */
213 ioaddr += MEM_STNAND_DATA;
214 }
215 this->IO_ADDR_R = this->IO_ADDR_W = (void __iomem *)ioaddr;
216 if (cmd != NAND_CMD_NONE) {
217 __raw_writeb(cmd, this->IO_ADDR_W);
218 wmb();
219 }
220}
221
223static int au1200_nand_device_ready(struct mtd_info *mtd)
222static int au1200_nand_device_ready(struct nand_chip *this)
224{
225 return alchemy_rdsmem(AU1000_MEM_STSTAT) & 1;
226}
227
228static struct mtd_partition db1200_nand_parts[] = {
229 {
230 .name = "NAND FS 0",
231 .offset = 0,

--- 738 unchanged lines hidden ---
223{
224 return alchemy_rdsmem(AU1000_MEM_STSTAT) & 1;
225}
226
227static struct mtd_partition db1200_nand_parts[] = {
228 {
229 .name = "NAND FS 0",
230 .offset = 0,

--- 738 unchanged lines hidden ---