Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Alchemy: Au1300 SoC support

Add basic support for the Au1300 variant(s):
- New GPIO/Interrupt controller
- DBDMA ids
- USB setup
- MMC support
- enable various PSC drivers
- detection code.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2866/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Manuel Lauss and committed by
Ralf Baechle
809f36c6 fb469f08

+1518 -51
+4
arch/mips/alchemy/Kconfig
··· 2 2 config ALCHEMY_GPIOINT_AU1000 3 3 bool 4 4 5 + # au1300-style GPIO/INT controller 6 + config ALCHEMY_GPIOINT_AU1300 7 + bool 8 + 5 9 # select this in your board config if you don't want to use the gpio 6 10 # namespace as documented in the manuals. In this case however you need 7 11 # to create the necessary gpio_* functions in your board code/headers!
+2 -1
arch/mips/alchemy/common/Makefile
··· 6 6 # 7 7 8 8 obj-y += prom.o time.o clocks.o platform.o power.o setup.o \ 9 - sleeper.o dma.o dbdma.o 9 + sleeper.o dma.o dbdma.o vss.o 10 10 11 11 obj-$(CONFIG_ALCHEMY_GPIOINT_AU1000) += irq.o 12 + obj-$(CONFIG_ALCHEMY_GPIOINT_AU1300) += gpioint.o 12 13 13 14 # optional gpiolib support 14 15 ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),)
+46
arch/mips/alchemy/common/dbdma.c
··· 148 148 { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, 149 149 }; 150 150 151 + static dbdev_tab_t au1300_dbdev_tab[] __initdata = { 152 + { AU1300_DSCR_CMD0_UART0_TX, DEV_FLAGS_OUT, 0, 8, 0x10100004, 0, 0 }, 153 + { AU1300_DSCR_CMD0_UART0_RX, DEV_FLAGS_IN, 0, 8, 0x10100000, 0, 0 }, 154 + { AU1300_DSCR_CMD0_UART1_TX, DEV_FLAGS_OUT, 0, 8, 0x10101004, 0, 0 }, 155 + { AU1300_DSCR_CMD0_UART1_RX, DEV_FLAGS_IN, 0, 8, 0x10101000, 0, 0 }, 156 + { AU1300_DSCR_CMD0_UART2_TX, DEV_FLAGS_OUT, 0, 8, 0x10102004, 0, 0 }, 157 + { AU1300_DSCR_CMD0_UART2_RX, DEV_FLAGS_IN, 0, 8, 0x10102000, 0, 0 }, 158 + { AU1300_DSCR_CMD0_UART3_TX, DEV_FLAGS_OUT, 0, 8, 0x10103004, 0, 0 }, 159 + { AU1300_DSCR_CMD0_UART3_RX, DEV_FLAGS_IN, 0, 8, 0x10103000, 0, 0 }, 160 + 161 + { AU1300_DSCR_CMD0_SDMS_TX0, DEV_FLAGS_OUT, 4, 8, 0x10600000, 0, 0 }, 162 + { AU1300_DSCR_CMD0_SDMS_RX0, DEV_FLAGS_IN, 4, 8, 0x10600004, 0, 0 }, 163 + { AU1300_DSCR_CMD0_SDMS_TX1, DEV_FLAGS_OUT, 8, 8, 0x10601000, 0, 0 }, 164 + { AU1300_DSCR_CMD0_SDMS_RX1, DEV_FLAGS_IN, 8, 8, 0x10601004, 0, 0 }, 165 + 166 + { AU1300_DSCR_CMD0_AES_RX, DEV_FLAGS_IN , 4, 32, 0x10300008, 0, 0 }, 167 + { AU1300_DSCR_CMD0_AES_TX, DEV_FLAGS_OUT, 4, 32, 0x10300004, 0, 0 }, 168 + 169 + { AU1300_DSCR_CMD0_PSC0_TX, DEV_FLAGS_OUT, 0, 16, 0x10a0001c, 0, 0 }, 170 + { AU1300_DSCR_CMD0_PSC0_RX, DEV_FLAGS_IN, 0, 16, 0x10a0001c, 0, 0 }, 171 + { AU1300_DSCR_CMD0_PSC1_TX, DEV_FLAGS_OUT, 0, 16, 0x10a0101c, 0, 0 }, 172 + { AU1300_DSCR_CMD0_PSC1_RX, DEV_FLAGS_IN, 0, 16, 0x10a0101c, 0, 0 }, 173 + { AU1300_DSCR_CMD0_PSC2_TX, DEV_FLAGS_OUT, 0, 16, 0x10a0201c, 0, 0 }, 174 + { AU1300_DSCR_CMD0_PSC2_RX, DEV_FLAGS_IN, 0, 16, 0x10a0201c, 0, 0 }, 175 + { AU1300_DSCR_CMD0_PSC3_TX, DEV_FLAGS_OUT, 0, 16, 0x10a0301c, 0, 0 }, 176 + { AU1300_DSCR_CMD0_PSC3_RX, DEV_FLAGS_IN, 0, 16, 0x10a0301c, 0, 0 }, 177 + 178 + { AU1300_DSCR_CMD0_LCD, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, 179 + { AU1300_DSCR_CMD0_NAND_FLASH, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 }, 180 + 181 + { AU1300_DSCR_CMD0_SDMS_TX2, DEV_FLAGS_OUT, 4, 8, 0x10602000, 0, 0 }, 182 + { AU1300_DSCR_CMD0_SDMS_RX2, DEV_FLAGS_IN, 4, 8, 0x10602004, 0, 0 }, 183 + 184 + { AU1300_DSCR_CMD0_CIM_SYNC, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, 185 + 186 + { AU1300_DSCR_CMD0_UDMA, DEV_FLAGS_ANYUSE, 0, 32, 0x14001810, 0, 0 }, 187 + 188 + { AU1300_DSCR_CMD0_DMA_REQ0, 0, 0, 0, 0x00000000, 0, 0 }, 189 + { AU1300_DSCR_CMD0_DMA_REQ1, 0, 0, 0, 0x00000000, 0, 0 }, 190 + 191 + { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, 192 + { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, 193 + }; 194 + 151 195 /* 32 predefined plus 32 custom */ 152 196 #define DBDEV_TAB_SIZE 64 153 197 ··· 1082 1038 return dbdma_setup(AU1550_DDMA_INT, au1550_dbdev_tab); 1083 1039 case ALCHEMY_CPU_AU1200: 1084 1040 return dbdma_setup(AU1200_DDMA_INT, au1200_dbdev_tab); 1041 + case ALCHEMY_CPU_AU1300: 1042 + return dbdma_setup(AU1300_DDMA_INT, au1300_dbdev_tab); 1085 1043 } 1086 1044 return 0; 1087 1045 }
+411
arch/mips/alchemy/common/gpioint.c
··· 1 + /* 2 + * gpioint.c - Au1300 GPIO+Interrupt controller (I call it "GPIC") support. 3 + * 4 + * Copyright (c) 2009-2011 Manuel Lauss <manuel.lauss@googlemail.com> 5 + * 6 + * licensed under the GPLv2. 7 + */ 8 + 9 + #include <linux/io.h> 10 + #include <linux/interrupt.h> 11 + #include <linux/module.h> 12 + #include <linux/slab.h> 13 + #include <linux/syscore_ops.h> 14 + #include <linux/types.h> 15 + 16 + #include <asm/irq_cpu.h> 17 + #include <asm/mach-au1x00/au1000.h> 18 + #include <asm/mach-au1x00/gpio-au1300.h> 19 + 20 + static int au1300_gpic_settype(struct irq_data *d, unsigned int type); 21 + 22 + /* setup for known onchip sources */ 23 + struct gpic_devint_data { 24 + int irq; /* linux IRQ number */ 25 + int type; /* IRQ_TYPE_ */ 26 + int prio; /* irq priority, 0 highest, 3 lowest */ 27 + int internal; /* internal source (no ext. pin)? */ 28 + }; 29 + 30 + static const struct gpic_devint_data au1300_devints[] __initdata = { 31 + /* multifunction: gpio pin or device */ 32 + { AU1300_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 33 + { AU1300_UART2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 34 + { AU1300_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 35 + { AU1300_SD1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 36 + { AU1300_SD2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 37 + { AU1300_PSC0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 38 + { AU1300_PSC1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 39 + { AU1300_PSC2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 40 + { AU1300_PSC3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 41 + { AU1300_NAND_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0, }, 42 + /* au1300 internal */ 43 + { AU1300_DDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 44 + { AU1300_MMU_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 45 + { AU1300_MPU_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 46 + { AU1300_GPU_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 47 + { AU1300_UDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 48 + { AU1300_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 49 + { AU1300_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 50 + { AU1300_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 51 + { AU1300_TOY_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 52 + { AU1300_RTC_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 53 + { AU1300_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 54 + { AU1300_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 55 + { AU1300_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 1, }, 56 + { AU1300_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 57 + { AU1300_SD0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 58 + { AU1300_USB_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 59 + { AU1300_LCD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 60 + { AU1300_BSA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 61 + { AU1300_MPE_INT, IRQ_TYPE_EDGE_RISING, 1, 1, }, 62 + { AU1300_ITE_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 63 + { AU1300_AES_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 64 + { AU1300_CIM_INT, IRQ_TYPE_LEVEL_HIGH, 1, 1, }, 65 + { -1, }, /* terminator */ 66 + }; 67 + 68 + 69 + /* 70 + * au1300_gpic_chgcfg - change PIN configuration. 71 + * @gpio: pin to change (0-based GPIO number from datasheet). 72 + * @clr: clear all bits set in 'clr'. 73 + * @set: set these bits. 74 + * 75 + * modifies a pins' configuration register, bits set in @clr will 76 + * be cleared in the register, bits in @set will be set. 77 + */ 78 + static inline void au1300_gpic_chgcfg(unsigned int gpio, 79 + unsigned long clr, 80 + unsigned long set) 81 + { 82 + void __iomem *r = AU1300_GPIC_ADDR; 83 + unsigned long l; 84 + 85 + r += gpio * 4; /* offset into pin config array */ 86 + l = __raw_readl(r + AU1300_GPIC_PINCFG); 87 + l &= ~clr; 88 + l |= set; 89 + __raw_writel(l, r + AU1300_GPIC_PINCFG); 90 + wmb(); 91 + } 92 + 93 + /* 94 + * au1300_pinfunc_to_gpio - assign a pin as GPIO input (GPIO ctrl). 95 + * @pin: pin (0-based GPIO number from datasheet). 96 + * 97 + * Assigns a GPIO pin to the GPIO controller, so its level can either 98 + * be read or set through the generic GPIO functions. 99 + * If you need a GPOUT, use au1300_gpio_set_value(pin, 0/1). 100 + * REVISIT: is this function really necessary? 101 + */ 102 + void au1300_pinfunc_to_gpio(enum au1300_multifunc_pins gpio) 103 + { 104 + au1300_gpio_direction_input(gpio + AU1300_GPIO_BASE); 105 + } 106 + EXPORT_SYMBOL_GPL(au1300_pinfunc_to_gpio); 107 + 108 + /* 109 + * au1300_pinfunc_to_dev - assign a pin to the device function. 110 + * @pin: pin (0-based GPIO number from datasheet). 111 + * 112 + * Assigns a GPIO pin to its associated device function; the pin will be 113 + * driven by the device and not through GPIO functions. 114 + */ 115 + void au1300_pinfunc_to_dev(enum au1300_multifunc_pins gpio) 116 + { 117 + void __iomem *r = AU1300_GPIC_ADDR; 118 + unsigned long bit; 119 + 120 + r += GPIC_GPIO_BANKOFF(gpio); 121 + bit = GPIC_GPIO_TO_BIT(gpio); 122 + __raw_writel(bit, r + AU1300_GPIC_DEVSEL); 123 + wmb(); 124 + } 125 + EXPORT_SYMBOL_GPL(au1300_pinfunc_to_dev); 126 + 127 + /* 128 + * au1300_set_irq_priority - set internal priority of IRQ. 129 + * @irq: irq to set priority (linux irq number). 130 + * @p: priority (0 = highest, 3 = lowest). 131 + */ 132 + void au1300_set_irq_priority(unsigned int irq, int p) 133 + { 134 + irq -= ALCHEMY_GPIC_INT_BASE; 135 + au1300_gpic_chgcfg(irq, GPIC_CFG_IL_MASK, GPIC_CFG_IL_SET(p)); 136 + } 137 + EXPORT_SYMBOL_GPL(au1300_set_irq_priority); 138 + 139 + /* 140 + * au1300_set_dbdma_gpio - assign a gpio to one of the DBDMA triggers. 141 + * @dchan: dbdma trigger select (0, 1). 142 + * @gpio: pin to assign as trigger. 143 + * 144 + * DBDMA controller has 2 external trigger sources; this function 145 + * assigns a GPIO to the selected trigger. 146 + */ 147 + void au1300_set_dbdma_gpio(int dchan, unsigned int gpio) 148 + { 149 + unsigned long r; 150 + 151 + if ((dchan >= 0) && (dchan <= 1)) { 152 + r = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_DMASEL); 153 + r &= ~(0xff << (8 * dchan)); 154 + r |= (gpio & 0x7f) << (8 * dchan); 155 + __raw_writel(r, AU1300_GPIC_ADDR + AU1300_GPIC_DMASEL); 156 + wmb(); 157 + } 158 + } 159 + 160 + /**********************************************************************/ 161 + 162 + static inline void gpic_pin_set_idlewake(unsigned int gpio, int allow) 163 + { 164 + au1300_gpic_chgcfg(gpio, GPIC_CFG_IDLEWAKE, 165 + allow ? GPIC_CFG_IDLEWAKE : 0); 166 + } 167 + 168 + static void au1300_gpic_mask(struct irq_data *d) 169 + { 170 + void __iomem *r = AU1300_GPIC_ADDR; 171 + unsigned long bit, irq = d->irq; 172 + 173 + irq -= ALCHEMY_GPIC_INT_BASE; 174 + r += GPIC_GPIO_BANKOFF(irq); 175 + bit = GPIC_GPIO_TO_BIT(irq); 176 + __raw_writel(bit, r + AU1300_GPIC_IDIS); 177 + wmb(); 178 + 179 + gpic_pin_set_idlewake(irq, 0); 180 + } 181 + 182 + static void au1300_gpic_unmask(struct irq_data *d) 183 + { 184 + void __iomem *r = AU1300_GPIC_ADDR; 185 + unsigned long bit, irq = d->irq; 186 + 187 + irq -= ALCHEMY_GPIC_INT_BASE; 188 + 189 + gpic_pin_set_idlewake(irq, 1); 190 + 191 + r += GPIC_GPIO_BANKOFF(irq); 192 + bit = GPIC_GPIO_TO_BIT(irq); 193 + __raw_writel(bit, r + AU1300_GPIC_IEN); 194 + wmb(); 195 + } 196 + 197 + static void au1300_gpic_maskack(struct irq_data *d) 198 + { 199 + void __iomem *r = AU1300_GPIC_ADDR; 200 + unsigned long bit, irq = d->irq; 201 + 202 + irq -= ALCHEMY_GPIC_INT_BASE; 203 + r += GPIC_GPIO_BANKOFF(irq); 204 + bit = GPIC_GPIO_TO_BIT(irq); 205 + __raw_writel(bit, r + AU1300_GPIC_IPEND); /* ack */ 206 + __raw_writel(bit, r + AU1300_GPIC_IDIS); /* mask */ 207 + wmb(); 208 + 209 + gpic_pin_set_idlewake(irq, 0); 210 + } 211 + 212 + static void au1300_gpic_ack(struct irq_data *d) 213 + { 214 + void __iomem *r = AU1300_GPIC_ADDR; 215 + unsigned long bit, irq = d->irq; 216 + 217 + irq -= ALCHEMY_GPIC_INT_BASE; 218 + r += GPIC_GPIO_BANKOFF(irq); 219 + bit = GPIC_GPIO_TO_BIT(irq); 220 + __raw_writel(bit, r + AU1300_GPIC_IPEND); /* ack */ 221 + wmb(); 222 + } 223 + 224 + static struct irq_chip au1300_gpic = { 225 + .name = "GPIOINT", 226 + .irq_ack = au1300_gpic_ack, 227 + .irq_mask = au1300_gpic_mask, 228 + .irq_mask_ack = au1300_gpic_maskack, 229 + .irq_unmask = au1300_gpic_unmask, 230 + .irq_set_type = au1300_gpic_settype, 231 + }; 232 + 233 + static int au1300_gpic_settype(struct irq_data *d, unsigned int type) 234 + { 235 + unsigned long s; 236 + unsigned char *name = NULL; 237 + irq_flow_handler_t hdl = NULL; 238 + 239 + switch (type) { 240 + case IRQ_TYPE_LEVEL_HIGH: 241 + s = GPIC_CFG_IC_LEVEL_HIGH; 242 + name = "high"; 243 + hdl = handle_level_irq; 244 + break; 245 + case IRQ_TYPE_LEVEL_LOW: 246 + s = GPIC_CFG_IC_LEVEL_LOW; 247 + name = "low"; 248 + hdl = handle_level_irq; 249 + break; 250 + case IRQ_TYPE_EDGE_RISING: 251 + s = GPIC_CFG_IC_EDGE_RISE; 252 + name = "posedge"; 253 + hdl = handle_edge_irq; 254 + break; 255 + case IRQ_TYPE_EDGE_FALLING: 256 + s = GPIC_CFG_IC_EDGE_FALL; 257 + name = "negedge"; 258 + hdl = handle_edge_irq; 259 + break; 260 + case IRQ_TYPE_EDGE_BOTH: 261 + s = GPIC_CFG_IC_EDGE_BOTH; 262 + name = "bothedge"; 263 + hdl = handle_edge_irq; 264 + break; 265 + case IRQ_TYPE_NONE: 266 + s = GPIC_CFG_IC_OFF; 267 + name = "disabled"; 268 + hdl = handle_level_irq; 269 + break; 270 + default: 271 + return -EINVAL; 272 + } 273 + 274 + __irq_set_chip_handler_name_locked(d->irq, &au1300_gpic, hdl, name); 275 + 276 + au1300_gpic_chgcfg(d->irq - ALCHEMY_GPIC_INT_BASE, GPIC_CFG_IC_MASK, s); 277 + 278 + return 0; 279 + } 280 + 281 + static void __init alchemy_gpic_init_irq(const struct gpic_devint_data *dints) 282 + { 283 + int i; 284 + void __iomem *bank_base; 285 + 286 + mips_cpu_irq_init(); 287 + 288 + /* disable & ack all possible interrupt sources */ 289 + for (i = 0; i < 4; i++) { 290 + bank_base = AU1300_GPIC_ADDR + (i * 4); 291 + __raw_writel(~0UL, bank_base + AU1300_GPIC_IDIS); 292 + wmb(); 293 + __raw_writel(~0UL, bank_base + AU1300_GPIC_IPEND); 294 + wmb(); 295 + } 296 + 297 + /* register an irq_chip for them, with 2nd highest priority */ 298 + for (i = ALCHEMY_GPIC_INT_BASE; i <= ALCHEMY_GPIC_INT_LAST; i++) { 299 + au1300_set_irq_priority(i, 1); 300 + au1300_gpic_settype(irq_get_irq_data(i), IRQ_TYPE_NONE); 301 + } 302 + 303 + /* setup known on-chip sources */ 304 + while ((i = dints->irq) != -1) { 305 + au1300_gpic_settype(irq_get_irq_data(i), dints->type); 306 + au1300_set_irq_priority(i, dints->prio); 307 + 308 + if (dints->internal) 309 + au1300_pinfunc_to_dev(i - ALCHEMY_GPIC_INT_BASE); 310 + 311 + dints++; 312 + } 313 + 314 + set_c0_status(IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3); 315 + } 316 + 317 + static unsigned long alchemy_gpic_pmdata[ALCHEMY_GPIC_INT_NUM + 6]; 318 + 319 + static int alchemy_gpic_suspend(void) 320 + { 321 + void __iomem *base = (void __iomem *)KSEG1ADDR(AU1300_GPIC_PHYS_ADDR); 322 + int i; 323 + 324 + /* save 4 interrupt mask status registers */ 325 + alchemy_gpic_pmdata[0] = __raw_readl(base + AU1300_GPIC_IEN + 0x0); 326 + alchemy_gpic_pmdata[1] = __raw_readl(base + AU1300_GPIC_IEN + 0x4); 327 + alchemy_gpic_pmdata[2] = __raw_readl(base + AU1300_GPIC_IEN + 0x8); 328 + alchemy_gpic_pmdata[3] = __raw_readl(base + AU1300_GPIC_IEN + 0xc); 329 + 330 + /* save misc register(s) */ 331 + alchemy_gpic_pmdata[4] = __raw_readl(base + AU1300_GPIC_DMASEL); 332 + 333 + /* molto silenzioso */ 334 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x0); 335 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x4); 336 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x8); 337 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0xc); 338 + wmb(); 339 + 340 + /* save pin/int-type configuration */ 341 + base += AU1300_GPIC_PINCFG; 342 + for (i = 0; i < ALCHEMY_GPIC_INT_NUM; i++) 343 + alchemy_gpic_pmdata[i + 5] = __raw_readl(base + (i << 2)); 344 + 345 + wmb(); 346 + 347 + return 0; 348 + } 349 + 350 + static void alchemy_gpic_resume(void) 351 + { 352 + void __iomem *base = (void __iomem *)KSEG1ADDR(AU1300_GPIC_PHYS_ADDR); 353 + int i; 354 + 355 + /* disable all first */ 356 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x0); 357 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x4); 358 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0x8); 359 + __raw_writel(~0UL, base + AU1300_GPIC_IDIS + 0xc); 360 + wmb(); 361 + 362 + /* restore pin/int-type configurations */ 363 + base += AU1300_GPIC_PINCFG; 364 + for (i = 0; i < ALCHEMY_GPIC_INT_NUM; i++) 365 + __raw_writel(alchemy_gpic_pmdata[i + 5], base + (i << 2)); 366 + wmb(); 367 + 368 + /* restore misc register(s) */ 369 + base = (void __iomem *)KSEG1ADDR(AU1300_GPIC_PHYS_ADDR); 370 + __raw_writel(alchemy_gpic_pmdata[4], base + AU1300_GPIC_DMASEL); 371 + wmb(); 372 + 373 + /* finally restore masks */ 374 + __raw_writel(alchemy_gpic_pmdata[0], base + AU1300_GPIC_IEN + 0x0); 375 + __raw_writel(alchemy_gpic_pmdata[1], base + AU1300_GPIC_IEN + 0x4); 376 + __raw_writel(alchemy_gpic_pmdata[2], base + AU1300_GPIC_IEN + 0x8); 377 + __raw_writel(alchemy_gpic_pmdata[3], base + AU1300_GPIC_IEN + 0xc); 378 + wmb(); 379 + } 380 + 381 + static struct syscore_ops alchemy_gpic_pmops = { 382 + .suspend = alchemy_gpic_suspend, 383 + .resume = alchemy_gpic_resume, 384 + }; 385 + 386 + /**********************************************************************/ 387 + 388 + void __init arch_init_irq(void) 389 + { 390 + switch (alchemy_get_cputype()) { 391 + case ALCHEMY_CPU_AU1300: 392 + alchemy_gpic_init_irq(&au1300_devints[0]); 393 + register_syscore_ops(&alchemy_gpic_pmops); 394 + break; 395 + } 396 + } 397 + 398 + #define CAUSEF_GPIC (CAUSEF_IP2 | CAUSEF_IP3 | CAUSEF_IP4 | CAUSEF_IP5) 399 + 400 + void plat_irq_dispatch(void) 401 + { 402 + unsigned long i, c = read_c0_cause() & read_c0_status(); 403 + 404 + if (c & CAUSEF_IP7) /* c0 timer */ 405 + do_IRQ(MIPS_CPU_IRQ_BASE + 7); 406 + else if (likely(c & CAUSEF_GPIC)) { 407 + i = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_PRIENC); 408 + do_IRQ(i + ALCHEMY_GPIC_INT_BASE); 409 + } else 410 + spurious_interrupt(); 411 + }
+42
arch/mips/alchemy/common/gpiolib.c
··· 27 27 * CONFIG_ALCHEMY_GPIO_INDIRECT=n, otherwise compilation will fail! 28 28 * au1000 SoC have only one GPIO block : GPIO1 29 29 * Au1100, Au15x0, Au12x0 have a second one : GPIO2 30 + * Au1300 is totally different: 1 block with up to 128 GPIOs 30 31 */ 31 32 32 33 #include <linux/init.h> ··· 36 35 #include <linux/types.h> 37 36 #include <linux/gpio.h> 38 37 #include <asm/mach-au1x00/gpio-au1000.h> 38 + #include <asm/mach-au1x00/gpio-au1300.h> 39 39 40 40 static int gpio2_get(struct gpio_chip *chip, unsigned offset) 41 41 { ··· 117 115 }, 118 116 }; 119 117 118 + static int alchemy_gpic_get(struct gpio_chip *chip, unsigned int off) 119 + { 120 + return au1300_gpio_get_value(off + AU1300_GPIO_BASE); 121 + } 122 + 123 + static void alchemy_gpic_set(struct gpio_chip *chip, unsigned int off, int v) 124 + { 125 + au1300_gpio_set_value(off + AU1300_GPIO_BASE, v); 126 + } 127 + 128 + static int alchemy_gpic_dir_input(struct gpio_chip *chip, unsigned int off) 129 + { 130 + return au1300_gpio_direction_input(off + AU1300_GPIO_BASE); 131 + } 132 + 133 + static int alchemy_gpic_dir_output(struct gpio_chip *chip, unsigned int off, 134 + int v) 135 + { 136 + return au1300_gpio_direction_output(off + AU1300_GPIO_BASE, v); 137 + } 138 + 139 + static int alchemy_gpic_gpio_to_irq(struct gpio_chip *chip, unsigned int off) 140 + { 141 + return au1300_gpio_to_irq(off + AU1300_GPIO_BASE); 142 + } 143 + 144 + static struct gpio_chip au1300_gpiochip = { 145 + .label = "alchemy-gpic", 146 + .direction_input = alchemy_gpic_dir_input, 147 + .direction_output = alchemy_gpic_dir_output, 148 + .get = alchemy_gpic_get, 149 + .set = alchemy_gpic_set, 150 + .to_irq = alchemy_gpic_gpio_to_irq, 151 + .base = AU1300_GPIO_BASE, 152 + .ngpio = AU1300_GPIO_NUM, 153 + }; 154 + 120 155 static int __init alchemy_gpiochip_init(void) 121 156 { 122 157 int ret = 0; ··· 165 126 case ALCHEMY_CPU_AU1500...ALCHEMY_CPU_AU1200: 166 127 ret = gpiochip_add(&alchemy_gpio_chip[0]); 167 128 ret |= gpiochip_add(&alchemy_gpio_chip[1]); 129 + break; 130 + case ALCHEMY_CPU_AU1300: 131 + ret = gpiochip_add(&au1300_gpiochip); 168 132 break; 169 133 } 170 134 return ret;
+29 -2
arch/mips/alchemy/common/platform.c
··· 82 82 PORT(AU1000_UART0_PHYS_ADDR, AU1200_UART0_INT), 83 83 PORT(AU1000_UART1_PHYS_ADDR, AU1200_UART1_INT), 84 84 }, 85 + [ALCHEMY_CPU_AU1300] = { 86 + PORT(AU1300_UART0_PHYS_ADDR, AU1300_UART0_INT), 87 + PORT(AU1300_UART1_PHYS_ADDR, AU1300_UART1_INT), 88 + PORT(AU1300_UART2_PHYS_ADDR, AU1300_UART2_INT), 89 + PORT(AU1300_UART3_PHYS_ADDR, AU1300_UART3_INT), 90 + }, 85 91 }; 86 92 87 93 static struct platform_device au1xx0_uart_device = { ··· 128 122 [ALCHEMY_CPU_AU1100] = { AU1000_USB_OHCI_PHYS_ADDR, AU1100_USB_HOST_INT }, 129 123 [ALCHEMY_CPU_AU1550] = { AU1550_USB_OHCI_PHYS_ADDR, AU1550_USB_HOST_INT }, 130 124 [ALCHEMY_CPU_AU1200] = { AU1200_USB_OHCI_PHYS_ADDR, AU1200_USB_INT }, 125 + [ALCHEMY_CPU_AU1300] = { AU1300_USB_OHCI0_PHYS_ADDR, AU1300_USB_INT }, 131 126 }; 132 127 133 128 static unsigned long alchemy_ehci_data[][2] __initdata = { 134 129 [ALCHEMY_CPU_AU1200] = { AU1200_USB_EHCI_PHYS_ADDR, AU1200_USB_INT }, 130 + [ALCHEMY_CPU_AU1300] = { AU1300_USB_EHCI_PHYS_ADDR, AU1300_USB_INT }, 135 131 }; 136 132 137 133 static int __init _new_usbres(struct resource **r, struct platform_device **d) ··· 177 169 printk(KERN_INFO "Alchemy USB: cannot add OHCI0\n"); 178 170 179 171 180 - /* setup EHCI0: Au1200 */ 181 - if (ctype == ALCHEMY_CPU_AU1200) { 172 + /* setup EHCI0: Au1200/Au1300 */ 173 + if ((ctype == ALCHEMY_CPU_AU1200) || (ctype == ALCHEMY_CPU_AU1300)) { 182 174 if (_new_usbres(&res, &pdev)) 183 175 return; 184 176 ··· 194 186 195 187 if (platform_device_register(pdev)) 196 188 printk(KERN_INFO "Alchemy USB: cannot add EHCI0\n"); 189 + } 190 + 191 + /* Au1300: OHCI1 */ 192 + if (ctype == ALCHEMY_CPU_AU1300) { 193 + if (_new_usbres(&res, &pdev)) 194 + return; 195 + 196 + res[0].start = AU1300_USB_OHCI1_PHYS_ADDR; 197 + res[0].end = res[0].start + 0x100 - 1; 198 + res[0].flags = IORESOURCE_MEM; 199 + res[1].start = AU1300_USB_INT; 200 + res[1].end = res[1].start; 201 + res[1].flags = IORESOURCE_IRQ; 202 + pdev->name = "au1xxx-ohci"; 203 + pdev->id = 1; 204 + pdev->dev.dma_mask = &alchemy_ohci_dmamask; 205 + 206 + if (platform_device_register(pdev)) 207 + printk(KERN_INFO "Alchemy USB: cannot add OHCI1\n"); 197 208 } 198 209 } 199 210
+3
arch/mips/alchemy/common/power.c
··· 126 126 case ALCHEMY_CPU_AU1200: 127 127 alchemy_sleep_au1550(); 128 128 break; 129 + case ALCHEMY_CPU_AU1300: 130 + alchemy_sleep_au1300(); 131 + break; 129 132 } 130 133 131 134 restore_core_regs();
+73
arch/mips/alchemy/common/sleeper.S
··· 153 153 154 154 END(alchemy_sleep_au1550) 155 155 156 + /* sleepcode for Au1300 memory controller type */ 157 + LEAF(alchemy_sleep_au1300) 158 + 159 + SETUP_SLEEP 160 + 161 + /* cache following instructions, as memory gets put to sleep */ 162 + la t0, 2f 163 + la t1, 4f 164 + subu t2, t1, t0 165 + 166 + .set mips3 167 + 168 + 1: cache 0x14, 0(t0) 169 + subu t2, t2, 32 170 + bgez t2, 1b 171 + addu t0, t0, 32 172 + 173 + .set mips0 174 + 175 + 2: lui a0, 0xb400 /* mem_xxx */ 176 + 177 + /* disable all ports in mem_sdportcfga */ 178 + sw zero, 0x868(a0) /* mem_sdportcfga */ 179 + sync 180 + 181 + /* disable ODT */ 182 + li t0, 0x03010000 183 + sw t0, 0x08d8(a0) /* mem_sdcmd0 */ 184 + sw t0, 0x08dc(a0) /* mem_sdcmd1 */ 185 + sync 186 + 187 + /* precharge */ 188 + li t0, 0x23000400 189 + sw t0, 0x08dc(a0) /* mem_sdcmd1 */ 190 + sw t0, 0x08d8(a0) /* mem_sdcmd0 */ 191 + sync 192 + 193 + /* auto refresh */ 194 + sw zero, 0x08c8(a0) /* mem_sdautoref */ 195 + sync 196 + 197 + /* block access to the DDR */ 198 + lw t0, 0x0848(a0) /* mem_sdconfigb */ 199 + li t1, (1 << 7 | 0x3F) 200 + or t0, t0, t1 201 + sw t0, 0x0848(a0) /* mem_sdconfigb */ 202 + sync 203 + 204 + /* issue the Self Refresh command */ 205 + li t0, 0x10000000 206 + sw t0, 0x08dc(a0) /* mem_sdcmd1 */ 207 + sw t0, 0x08d8(a0) /* mem_sdcmd0 */ 208 + sync 209 + 210 + /* wait for sdram to enter self-refresh mode */ 211 + lui t0, 0x0300 212 + 3: lw t1, 0x0850(a0) /* mem_sdstat */ 213 + and t2, t1, t0 214 + bne t2, t0, 3b 215 + nop 216 + 217 + /* disable SDRAM clocks */ 218 + li t0, ~(3<<28) 219 + lw t1, 0x0840(a0) /* mem_sdconfiga */ 220 + and t1, t1, t0 /* clear CE[1:0] */ 221 + sw t1, 0x0840(a0) /* mem_sdconfiga */ 222 + sync 223 + 224 + DO_SLEEP 225 + 4: 226 + 227 + END(alchemy_sleep_au1300) 228 + 156 229 157 230 /* This is where we return upon wakeup. 158 231 * Reload all of the registers and return.
+1
arch/mips/alchemy/common/time.c
··· 178 178 AU1100_RTC_MATCH2_INT, 179 179 AU1550_RTC_MATCH2_INT, 180 180 AU1200_RTC_MATCH2_INT, 181 + AU1300_RTC_MATCH2_INT, 181 182 }; 182 183 183 184 void __init plat_time_init(void)
+84
arch/mips/alchemy/common/vss.c
··· 1 + /* 2 + * Au1300 media block power gating (VSS) 3 + * 4 + * This is a stop-gap solution until I have the clock framework integration 5 + * ready. This stuff here really must be handled transparently when clocks 6 + * for various media blocks are enabled/disabled. 7 + */ 8 + 9 + #include <linux/module.h> 10 + #include <linux/spinlock.h> 11 + #include <asm/mach-au1x00/au1000.h> 12 + 13 + #define VSS_GATE 0x00 /* gate wait timers */ 14 + #define VSS_CLKRST 0x04 /* clock/block control */ 15 + #define VSS_FTR 0x08 /* footers */ 16 + 17 + #define VSS_ADDR(blk) (KSEG1ADDR(AU1300_VSS_PHYS_ADDR) + (blk * 0x0c)) 18 + 19 + static DEFINE_SPINLOCK(au1300_vss_lock); 20 + 21 + /* enable a block as outlined in the databook */ 22 + static inline void __enable_block(int block) 23 + { 24 + void __iomem *base = (void __iomem *)VSS_ADDR(block); 25 + 26 + __raw_writel(3, base + VSS_CLKRST); /* enable clock, assert reset */ 27 + wmb(); 28 + 29 + __raw_writel(0x01fffffe, base + VSS_GATE); /* maximum setup time */ 30 + wmb(); 31 + 32 + /* enable footers in sequence */ 33 + __raw_writel(0x01, base + VSS_FTR); 34 + wmb(); 35 + __raw_writel(0x03, base + VSS_FTR); 36 + wmb(); 37 + __raw_writel(0x07, base + VSS_FTR); 38 + wmb(); 39 + __raw_writel(0x0f, base + VSS_FTR); 40 + wmb(); 41 + 42 + __raw_writel(0x01ffffff, base + VSS_GATE); /* start FSM too */ 43 + wmb(); 44 + 45 + __raw_writel(2, base + VSS_CLKRST); /* deassert reset */ 46 + wmb(); 47 + 48 + __raw_writel(0x1f, base + VSS_FTR); /* enable isolation cells */ 49 + wmb(); 50 + } 51 + 52 + /* disable a block as outlined in the databook */ 53 + static inline void __disable_block(int block) 54 + { 55 + void __iomem *base = (void __iomem *)VSS_ADDR(block); 56 + 57 + __raw_writel(0x0f, base + VSS_FTR); /* disable isolation cells */ 58 + wmb(); 59 + __raw_writel(0, base + VSS_GATE); /* disable FSM */ 60 + wmb(); 61 + __raw_writel(3, base + VSS_CLKRST); /* assert reset */ 62 + wmb(); 63 + __raw_writel(1, base + VSS_CLKRST); /* disable clock */ 64 + wmb(); 65 + __raw_writel(0, base + VSS_FTR); /* disable all footers */ 66 + wmb(); 67 + } 68 + 69 + void au1300_vss_block_control(int block, int enable) 70 + { 71 + unsigned long flags; 72 + 73 + if (alchemy_get_cputype() != ALCHEMY_CPU_AU1300) 74 + return; 75 + 76 + /* only one block at a time */ 77 + spin_lock_irqsave(&au1300_vss_lock, flags); 78 + if (enable) 79 + __enable_block(block); 80 + else 81 + __disable_block(block); 82 + spin_unlock_irqrestore(&au1300_vss_lock, flags); 83 + } 84 + EXPORT_SYMBOL_GPL(au1300_vss_block_control);
+1
arch/mips/include/asm/cpu.h
··· 169 169 #define PRID_IMP_NETLOGIC_XLS412B 0x4c00 170 170 #define PRID_IMP_NETLOGIC_XLS408B 0x4e00 171 171 #define PRID_IMP_NETLOGIC_XLS404B 0x4f00 172 + #define PRID_IMP_NETLOGIC_AU13XX 0x8000 172 173 173 174 /* 174 175 * Definitions for 7:0 on legacy processors
+209 -12
arch/mips/include/asm/mach-au1x00/au1000.h
··· 136 136 #define ALCHEMY_CPU_AU1100 2 137 137 #define ALCHEMY_CPU_AU1550 3 138 138 #define ALCHEMY_CPU_AU1200 4 139 + #define ALCHEMY_CPU_AU1300 5 139 140 140 141 static inline int alchemy_get_cputype(void) 141 142 { ··· 157 156 case 0x05030000: 158 157 return ALCHEMY_CPU_AU1200; 159 158 break; 159 + case 0x800c0000: 160 + return ALCHEMY_CPU_AU1300; 161 + break; 160 162 } 161 163 162 164 return ALCHEMY_CPU_UNKNOWN; ··· 170 166 { 171 167 switch (type) { 172 168 case ALCHEMY_CPU_AU1000: 169 + case ALCHEMY_CPU_AU1300: 173 170 return 4; 174 171 case ALCHEMY_CPU_AU1500: 175 172 case ALCHEMY_CPU_AU1200: ··· 248 243 /* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */ 249 244 void alchemy_sleep_au1000(void); 250 245 void alchemy_sleep_au1550(void); 246 + void alchemy_sleep_au1300(void); 251 247 void au_sleep(void); 252 248 253 249 /* USB: drivers/usb/host/alchemy-common.c */ ··· 257 251 ALCHEMY_USB_UDC0, 258 252 ALCHEMY_USB_EHCI0, 259 253 ALCHEMY_USB_OTG0, 254 + ALCHEMY_USB_OHCI1, 260 255 }; 261 256 int alchemy_usb_control(int block, int enable); 262 257 ··· 270 263 unsigned long pci_cfg_clr; 271 264 }; 272 265 273 - /* SOC Interrupt numbers */ 266 + /* Multifunction pins: Each of these pins can either be assigned to the 267 + * GPIO controller or a on-chip peripheral. 268 + * Call "au1300_pinfunc_to_dev()" or "au1300_pinfunc_to_gpio()" to 269 + * assign one of these to either the GPIO controller or the device. 270 + */ 271 + enum au1300_multifunc_pins { 272 + /* wake-from-str pins 0-3 */ 273 + AU1300_PIN_WAKE0 = 0, AU1300_PIN_WAKE1, AU1300_PIN_WAKE2, 274 + AU1300_PIN_WAKE3, 275 + /* external clock sources for PSCs: 4-5 */ 276 + AU1300_PIN_EXTCLK0, AU1300_PIN_EXTCLK1, 277 + /* 8bit MMC interface on SD0: 6-9 */ 278 + AU1300_PIN_SD0DAT4, AU1300_PIN_SD0DAT5, AU1300_PIN_SD0DAT6, 279 + AU1300_PIN_SD0DAT7, 280 + /* aux clk input for freqgen 3: 10 */ 281 + AU1300_PIN_FG3AUX, 282 + /* UART1 pins: 11-18 */ 283 + AU1300_PIN_U1RI, AU1300_PIN_U1DCD, AU1300_PIN_U1DSR, 284 + AU1300_PIN_U1CTS, AU1300_PIN_U1RTS, AU1300_PIN_U1DTR, 285 + AU1300_PIN_U1RX, AU1300_PIN_U1TX, 286 + /* UART0 pins: 19-24 */ 287 + AU1300_PIN_U0RI, AU1300_PIN_U0DCD, AU1300_PIN_U0DSR, 288 + AU1300_PIN_U0CTS, AU1300_PIN_U0RTS, AU1300_PIN_U0DTR, 289 + /* UART2: 25-26 */ 290 + AU1300_PIN_U2RX, AU1300_PIN_U2TX, 291 + /* UART3: 27-28 */ 292 + AU1300_PIN_U3RX, AU1300_PIN_U3TX, 293 + /* LCD controller PWMs, ext pixclock: 29-31 */ 294 + AU1300_PIN_LCDPWM0, AU1300_PIN_LCDPWM1, AU1300_PIN_LCDCLKIN, 295 + /* SD1 interface: 32-37 */ 296 + AU1300_PIN_SD1DAT0, AU1300_PIN_SD1DAT1, AU1300_PIN_SD1DAT2, 297 + AU1300_PIN_SD1DAT3, AU1300_PIN_SD1CMD, AU1300_PIN_SD1CLK, 298 + /* SD2 interface: 38-43 */ 299 + AU1300_PIN_SD2DAT0, AU1300_PIN_SD2DAT1, AU1300_PIN_SD2DAT2, 300 + AU1300_PIN_SD2DAT3, AU1300_PIN_SD2CMD, AU1300_PIN_SD2CLK, 301 + /* PSC0/1 clocks: 44-45 */ 302 + AU1300_PIN_PSC0CLK, AU1300_PIN_PSC1CLK, 303 + /* PSCs: 46-49/50-53/54-57/58-61 */ 304 + AU1300_PIN_PSC0SYNC0, AU1300_PIN_PSC0SYNC1, AU1300_PIN_PSC0D0, 305 + AU1300_PIN_PSC0D1, 306 + AU1300_PIN_PSC1SYNC0, AU1300_PIN_PSC1SYNC1, AU1300_PIN_PSC1D0, 307 + AU1300_PIN_PSC1D1, 308 + AU1300_PIN_PSC2SYNC0, AU1300_PIN_PSC2SYNC1, AU1300_PIN_PSC2D0, 309 + AU1300_PIN_PSC2D1, 310 + AU1300_PIN_PSC3SYNC0, AU1300_PIN_PSC3SYNC1, AU1300_PIN_PSC3D0, 311 + AU1300_PIN_PSC3D1, 312 + /* PCMCIA interface: 62-70 */ 313 + AU1300_PIN_PCE2, AU1300_PIN_PCE1, AU1300_PIN_PIOS16, 314 + AU1300_PIN_PIOR, AU1300_PIN_PWE, AU1300_PIN_PWAIT, 315 + AU1300_PIN_PREG, AU1300_PIN_POE, AU1300_PIN_PIOW, 316 + /* camera interface H/V sync inputs: 71-72 */ 317 + AU1300_PIN_CIMLS, AU1300_PIN_CIMFS, 318 + /* PSC2/3 clocks: 73-74 */ 319 + AU1300_PIN_PSC2CLK, AU1300_PIN_PSC3CLK, 320 + }; 274 321 322 + /* GPIC (Au1300) pin management: arch/mips/alchemy/common/gpioint.c */ 323 + extern void au1300_pinfunc_to_gpio(enum au1300_multifunc_pins gpio); 324 + extern void au1300_pinfunc_to_dev(enum au1300_multifunc_pins gpio); 325 + extern void au1300_set_irq_priority(unsigned int irq, int p); 326 + extern void au1300_set_dbdma_gpio(int dchan, unsigned int gpio); 327 + 328 + /* Au1300 allows to disconnect certain blocks from internal power supply */ 329 + enum au1300_vss_block { 330 + AU1300_VSS_MPE = 0, 331 + AU1300_VSS_BSA, 332 + AU1300_VSS_GPE, 333 + AU1300_VSS_MGP, 334 + }; 335 + 336 + extern void au1300_vss_block_control(int block, int enable); 337 + 338 + 339 + /* SOC Interrupt numbers */ 340 + /* Au1000-style (IC0/1): 2 controllers with 32 sources each */ 275 341 #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8) 276 342 #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) 277 343 #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) 278 344 #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) 279 345 #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST 346 + 347 + /* Au1300-style (GPIC): 1 controller with up to 128 sources */ 348 + #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) 349 + #define ALCHEMY_GPIC_INT_NUM 128 350 + #define ALCHEMY_GPIC_INT_LAST (ALCHEMY_GPIC_INT_BASE + ALCHEMY_GPIC_INT_NUM - 1) 280 351 281 352 enum soc_au1000_ints { 282 353 AU1000_FIRST_INT = AU1000_INTC0_INT_BASE, ··· 676 591 677 592 #endif /* !defined (_LANGUAGE_ASSEMBLY) */ 678 593 594 + /* Au1300 peripheral interrupt numbers */ 595 + #define AU1300_FIRST_INT (ALCHEMY_GPIC_INT_BASE) 596 + #define AU1300_UART1_INT (AU1300_FIRST_INT + 17) 597 + #define AU1300_UART2_INT (AU1300_FIRST_INT + 25) 598 + #define AU1300_UART3_INT (AU1300_FIRST_INT + 27) 599 + #define AU1300_SD1_INT (AU1300_FIRST_INT + 32) 600 + #define AU1300_SD2_INT (AU1300_FIRST_INT + 38) 601 + #define AU1300_PSC0_INT (AU1300_FIRST_INT + 48) 602 + #define AU1300_PSC1_INT (AU1300_FIRST_INT + 52) 603 + #define AU1300_PSC2_INT (AU1300_FIRST_INT + 56) 604 + #define AU1300_PSC3_INT (AU1300_FIRST_INT + 60) 605 + #define AU1300_NAND_INT (AU1300_FIRST_INT + 62) 606 + #define AU1300_DDMA_INT (AU1300_FIRST_INT + 75) 607 + #define AU1300_MMU_INT (AU1300_FIRST_INT + 76) 608 + #define AU1300_MPU_INT (AU1300_FIRST_INT + 77) 609 + #define AU1300_GPU_INT (AU1300_FIRST_INT + 78) 610 + #define AU1300_UDMA_INT (AU1300_FIRST_INT + 79) 611 + #define AU1300_TOY_INT (AU1300_FIRST_INT + 80) 612 + #define AU1300_TOY_MATCH0_INT (AU1300_FIRST_INT + 81) 613 + #define AU1300_TOY_MATCH1_INT (AU1300_FIRST_INT + 82) 614 + #define AU1300_TOY_MATCH2_INT (AU1300_FIRST_INT + 83) 615 + #define AU1300_RTC_INT (AU1300_FIRST_INT + 84) 616 + #define AU1300_RTC_MATCH0_INT (AU1300_FIRST_INT + 85) 617 + #define AU1300_RTC_MATCH1_INT (AU1300_FIRST_INT + 86) 618 + #define AU1300_RTC_MATCH2_INT (AU1300_FIRST_INT + 87) 619 + #define AU1300_UART0_INT (AU1300_FIRST_INT + 88) 620 + #define AU1300_SD0_INT (AU1300_FIRST_INT + 89) 621 + #define AU1300_USB_INT (AU1300_FIRST_INT + 90) 622 + #define AU1300_LCD_INT (AU1300_FIRST_INT + 91) 623 + #define AU1300_BSA_INT (AU1300_FIRST_INT + 92) 624 + #define AU1300_MPE_INT (AU1300_FIRST_INT + 93) 625 + #define AU1300_ITE_INT (AU1300_FIRST_INT + 94) 626 + #define AU1300_AES_INT (AU1300_FIRST_INT + 95) 627 + #define AU1300_CIM_INT (AU1300_FIRST_INT + 96) 628 + 629 + /**********************************************************************/ 630 + 679 631 /* 680 632 * Physical base addresses for integrated peripherals 681 - * 0..au1000 1..au1500 2..au1100 3..au1550 4..au1200 633 + * 0..au1000 1..au1500 2..au1100 3..au1550 4..au1200 5..au1300 682 634 */ 683 635 684 636 #define AU1000_AC97_PHYS_ADDR 0x10000000 /* 012 */ 637 + #define AU1300_ROM_PHYS_ADDR 0x10000000 /* 5 */ 638 + #define AU1300_OTP_PHYS_ADDR 0x10002000 /* 5 */ 639 + #define AU1300_VSS_PHYS_ADDR 0x10003000 /* 5 */ 640 + #define AU1300_UART0_PHYS_ADDR 0x10100000 /* 5 */ 641 + #define AU1300_UART1_PHYS_ADDR 0x10101000 /* 5 */ 642 + #define AU1300_UART2_PHYS_ADDR 0x10102000 /* 5 */ 643 + #define AU1300_UART3_PHYS_ADDR 0x10103000 /* 5 */ 685 644 #define AU1000_USB_OHCI_PHYS_ADDR 0x10100000 /* 012 */ 686 645 #define AU1000_USB_UDC_PHYS_ADDR 0x10200000 /* 0123 */ 646 + #define AU1300_GPIC_PHYS_ADDR 0x10200000 /* 5 */ 687 647 #define AU1000_IRDA_PHYS_ADDR 0x10300000 /* 02 */ 688 - #define AU1200_AES_PHYS_ADDR 0x10300000 /* 4 */ 648 + #define AU1200_AES_PHYS_ADDR 0x10300000 /* 45 */ 689 649 #define AU1000_IC0_PHYS_ADDR 0x10400000 /* 01234 */ 650 + #define AU1300_GPU_PHYS_ADDR 0x10500000 /* 5 */ 690 651 #define AU1000_MAC0_PHYS_ADDR 0x10500000 /* 023 */ 691 652 #define AU1000_MAC1_PHYS_ADDR 0x10510000 /* 023 */ 692 653 #define AU1000_MACEN_PHYS_ADDR 0x10520000 /* 023 */ 693 - #define AU1100_SD0_PHYS_ADDR 0x10600000 /* 24 */ 654 + #define AU1100_SD0_PHYS_ADDR 0x10600000 /* 245 */ 655 + #define AU1300_SD1_PHYS_ADDR 0x10601000 /* 5 */ 656 + #define AU1300_SD2_PHYS_ADDR 0x10602000 /* 5 */ 694 657 #define AU1100_SD1_PHYS_ADDR 0x10680000 /* 24 */ 658 + #define AU1300_SYS_PHYS_ADDR 0x10900000 /* 5 */ 695 659 #define AU1550_PSC2_PHYS_ADDR 0x10A00000 /* 3 */ 696 660 #define AU1550_PSC3_PHYS_ADDR 0x10B00000 /* 3 */ 661 + #define AU1300_PSC0_PHYS_ADDR 0x10A00000 /* 5 */ 662 + #define AU1300_PSC1_PHYS_ADDR 0x10A01000 /* 5 */ 663 + #define AU1300_PSC2_PHYS_ADDR 0x10A02000 /* 5 */ 664 + #define AU1300_PSC3_PHYS_ADDR 0x10A03000 /* 5 */ 697 665 #define AU1000_I2S_PHYS_ADDR 0x11000000 /* 02 */ 698 666 #define AU1500_MAC0_PHYS_ADDR 0x11500000 /* 1 */ 699 667 #define AU1500_MAC1_PHYS_ADDR 0x11510000 /* 1 */ ··· 760 622 #define AU1000_SSI1_PHYS_ADDR 0x11680000 /* 02 */ 761 623 #define AU1500_GPIO2_PHYS_ADDR 0x11700000 /* 1234 */ 762 624 #define AU1000_IC1_PHYS_ADDR 0x11800000 /* 01234 */ 763 - #define AU1000_SYS_PHYS_ADDR 0x11900000 /* 01234 */ 625 + #define AU1000_SYS_PHYS_ADDR 0x11900000 /* 012345 */ 764 626 #define AU1550_PSC0_PHYS_ADDR 0x11A00000 /* 34 */ 765 627 #define AU1550_PSC1_PHYS_ADDR 0x11B00000 /* 34 */ 766 628 #define AU1000_MEM_PHYS_ADDR 0x14000000 /* 01234 */ 767 629 #define AU1000_STATIC_MEM_PHYS_ADDR 0x14001000 /* 01234 */ 630 + #define AU1300_UDMA_PHYS_ADDR 0x14001800 /* 5 */ 768 631 #define AU1000_DMA_PHYS_ADDR 0x14002000 /* 012 */ 769 - #define AU1550_DBDMA_PHYS_ADDR 0x14002000 /* 34 */ 770 - #define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 34 */ 632 + #define AU1550_DBDMA_PHYS_ADDR 0x14002000 /* 345 */ 633 + #define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 345 */ 771 634 #define AU1000_MACDMA0_PHYS_ADDR 0x14004000 /* 0123 */ 772 635 #define AU1000_MACDMA1_PHYS_ADDR 0x14004200 /* 0123 */ 773 - #define AU1200_CIM_PHYS_ADDR 0x14004000 /* 4 */ 636 + #define AU1200_CIM_PHYS_ADDR 0x14004000 /* 45 */ 774 637 #define AU1500_PCI_PHYS_ADDR 0x14005000 /* 13 */ 775 638 #define AU1550_PE_PHYS_ADDR 0x14008000 /* 3 */ 776 639 #define AU1200_MAEBE_PHYS_ADDR 0x14010000 /* 4 */ 777 640 #define AU1200_MAEFE_PHYS_ADDR 0x14012000 /* 4 */ 641 + #define AU1300_MAEITE_PHYS_ADDR 0x14010000 /* 5 */ 642 + #define AU1300_MAEMPE_PHYS_ADDR 0x14014000 /* 5 */ 778 643 #define AU1550_USB_OHCI_PHYS_ADDR 0x14020000 /* 3 */ 779 644 #define AU1200_USB_CTL_PHYS_ADDR 0x14020000 /* 4 */ 780 645 #define AU1200_USB_OTG_PHYS_ADDR 0x14020020 /* 4 */ 781 646 #define AU1200_USB_OHCI_PHYS_ADDR 0x14020100 /* 4 */ 782 647 #define AU1200_USB_EHCI_PHYS_ADDR 0x14020200 /* 4 */ 783 648 #define AU1200_USB_UDC_PHYS_ADDR 0x14022000 /* 4 */ 649 + #define AU1300_USB_EHCI_PHYS_ADDR 0x14020000 /* 5 */ 650 + #define AU1300_USB_OHCI0_PHYS_ADDR 0x14020400 /* 5 */ 651 + #define AU1300_USB_OHCI1_PHYS_ADDR 0x14020800 /* 5 */ 652 + #define AU1300_USB_CTL_PHYS_ADDR 0x14021000 /* 5 */ 653 + #define AU1300_USB_OTG_PHYS_ADDR 0x14022000 /* 5 */ 654 + #define AU1300_MAEBSA_PHYS_ADDR 0x14030000 /* 5 */ 784 655 #define AU1100_LCD_PHYS_ADDR 0x15000000 /* 2 */ 785 - #define AU1200_LCD_PHYS_ADDR 0x15000000 /* 4 */ 656 + #define AU1200_LCD_PHYS_ADDR 0x15000000 /* 45 */ 786 657 #define AU1500_PCI_MEM_PHYS_ADDR 0x400000000ULL /* 13 */ 787 658 #define AU1500_PCI_IO_PHYS_ADDR 0x500000000ULL /* 13 */ 788 659 #define AU1500_PCI_CONFIG0_PHYS_ADDR 0x600000000ULL /* 13 */ 789 660 #define AU1500_PCI_CONFIG1_PHYS_ADDR 0x680000000ULL /* 13 */ 790 - #define AU1000_PCMCIA_IO_PHYS_ADDR 0xF00000000ULL /* 01234 */ 791 - #define AU1000_PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL /* 01234 */ 792 - #define AU1000_PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL /* 01234 */ 661 + #define AU1000_PCMCIA_IO_PHYS_ADDR 0xF00000000ULL /* 012345 */ 662 + #define AU1000_PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL /* 012345 */ 663 + #define AU1000_PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL /* 012345 */ 793 664 665 + /**********************************************************************/ 666 + 667 + 668 + /* 669 + * Au1300 GPIO+INT controller (GPIC) register offsets and bits 670 + * Registers are 128bits (0x10 bytes), divided into 4 "banks". 671 + */ 672 + #define AU1300_GPIC_PINVAL 0x0000 673 + #define AU1300_GPIC_PINVALCLR 0x0010 674 + #define AU1300_GPIC_IPEND 0x0020 675 + #define AU1300_GPIC_PRIENC 0x0030 676 + #define AU1300_GPIC_IEN 0x0040 /* int_mask in manual */ 677 + #define AU1300_GPIC_IDIS 0x0050 /* int_maskclr in manual */ 678 + #define AU1300_GPIC_DMASEL 0x0060 679 + #define AU1300_GPIC_DEVSEL 0x0080 680 + #define AU1300_GPIC_DEVCLR 0x0090 681 + #define AU1300_GPIC_RSTVAL 0x00a0 682 + /* pin configuration space. one 32bit register for up to 128 IRQs */ 683 + #define AU1300_GPIC_PINCFG 0x1000 684 + 685 + #define GPIC_GPIO_TO_BIT(gpio) \ 686 + (1 << ((gpio) & 0x1f)) 687 + 688 + #define GPIC_GPIO_BANKOFF(gpio) \ 689 + (((gpio) >> 5) * 4) 690 + 691 + /* Pin Control bits: who owns the pin, what does it do */ 692 + #define GPIC_CFG_PC_GPIN 0 693 + #define GPIC_CFG_PC_DEV 1 694 + #define GPIC_CFG_PC_GPOLOW 2 695 + #define GPIC_CFG_PC_GPOHIGH 3 696 + #define GPIC_CFG_PC_MASK 3 697 + 698 + /* assign pin to MIPS IRQ line */ 699 + #define GPIC_CFG_IL_SET(x) (((x) & 3) << 2) 700 + #define GPIC_CFG_IL_MASK (3 << 2) 701 + 702 + /* pin interrupt type setup */ 703 + #define GPIC_CFG_IC_OFF (0 << 4) 704 + #define GPIC_CFG_IC_LEVEL_LOW (1 << 4) 705 + #define GPIC_CFG_IC_LEVEL_HIGH (2 << 4) 706 + #define GPIC_CFG_IC_EDGE_FALL (5 << 4) 707 + #define GPIC_CFG_IC_EDGE_RISE (6 << 4) 708 + #define GPIC_CFG_IC_EDGE_BOTH (7 << 4) 709 + #define GPIC_CFG_IC_MASK (7 << 4) 710 + 711 + /* allow interrupt to wake cpu from 'wait' */ 712 + #define GPIC_CFG_IDLEWAKE (1 << 7) 713 + 714 + /***********************************************************************/ 794 715 795 716 /* Au1000 SDRAM memory controller register offsets */ 796 717 #define AU1000_MEM_SDMODE0 0x0000
+2
arch/mips/include/asm/mach-au1x00/au1100_mmc.h
··· 130 130 #define SD_CONFIG2_DF (0x00000008) 131 131 #define SD_CONFIG2_DC (0x00000010) 132 132 #define SD_CONFIG2_xx2 (0x000000e0) 133 + #define SD_CONFIG2_BB (0x00000080) 133 134 #define SD_CONFIG2_WB (0x00000100) 134 135 #define SD_CONFIG2_RW (0x00000200) 136 + #define SD_CONFIG2_DP (0x00000400) 135 137 136 138 137 139 /*
+31
arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h
··· 183 183 #define AU1200_DSCR_CMD0_PSC1_SYNC 25 184 184 #define AU1200_DSCR_CMD0_CIM_SYNC 26 185 185 186 + #define AU1300_DSCR_CMD0_UART0_TX 0 187 + #define AU1300_DSCR_CMD0_UART0_RX 1 188 + #define AU1300_DSCR_CMD0_UART1_TX 2 189 + #define AU1300_DSCR_CMD0_UART1_RX 3 190 + #define AU1300_DSCR_CMD0_UART2_TX 4 191 + #define AU1300_DSCR_CMD0_UART2_RX 5 192 + #define AU1300_DSCR_CMD0_UART3_TX 6 193 + #define AU1300_DSCR_CMD0_UART3_RX 7 194 + #define AU1300_DSCR_CMD0_SDMS_TX0 8 195 + #define AU1300_DSCR_CMD0_SDMS_RX0 9 196 + #define AU1300_DSCR_CMD0_SDMS_TX1 10 197 + #define AU1300_DSCR_CMD0_SDMS_RX1 11 198 + #define AU1300_DSCR_CMD0_AES_TX 12 199 + #define AU1300_DSCR_CMD0_AES_RX 13 200 + #define AU1300_DSCR_CMD0_PSC0_TX 14 201 + #define AU1300_DSCR_CMD0_PSC0_RX 15 202 + #define AU1300_DSCR_CMD0_PSC1_TX 16 203 + #define AU1300_DSCR_CMD0_PSC1_RX 17 204 + #define AU1300_DSCR_CMD0_PSC2_TX 18 205 + #define AU1300_DSCR_CMD0_PSC2_RX 19 206 + #define AU1300_DSCR_CMD0_PSC3_TX 20 207 + #define AU1300_DSCR_CMD0_PSC3_RX 21 208 + #define AU1300_DSCR_CMD0_LCD 22 209 + #define AU1300_DSCR_CMD0_NAND_FLASH 23 210 + #define AU1300_DSCR_CMD0_SDMS_TX2 24 211 + #define AU1300_DSCR_CMD0_SDMS_RX2 25 212 + #define AU1300_DSCR_CMD0_CIM_SYNC 26 213 + #define AU1300_DSCR_CMD0_UDMA 27 214 + #define AU1300_DSCR_CMD0_DMA_REQ0 28 215 + #define AU1300_DSCR_CMD0_DMA_REQ1 29 216 + 186 217 #define DSCR_CMD0_THROTTLE 30 187 218 #define DSCR_CMD0_ALWAYS 31 188 219 #define DSCR_NDEV_IDS 32
+241
arch/mips/include/asm/mach-au1x00/gpio-au1300.h
··· 1 + /* 2 + * gpio-au1300.h -- GPIO control for Au1300 GPIC and compatibles. 3 + * 4 + * Copyright (c) 2009-2011 Manuel Lauss <manuel.lauss@googlemail.com> 5 + */ 6 + 7 + #ifndef _GPIO_AU1300_H_ 8 + #define _GPIO_AU1300_H_ 9 + 10 + #include <asm/addrspace.h> 11 + #include <asm/io.h> 12 + #include <asm/mach-au1x00/au1000.h> 13 + 14 + /* with the current GPIC design, up to 128 GPIOs are possible. 15 + * The only implementation so far is in the Au1300, which has 75 externally 16 + * available GPIOs. 17 + */ 18 + #define AU1300_GPIO_BASE 0 19 + #define AU1300_GPIO_NUM 75 20 + #define AU1300_GPIO_MAX (AU1300_GPIO_BASE + AU1300_GPIO_NUM - 1) 21 + 22 + #define AU1300_GPIC_ADDR \ 23 + (void __iomem *)KSEG1ADDR(AU1300_GPIC_PHYS_ADDR) 24 + 25 + static inline int au1300_gpio_get_value(unsigned int gpio) 26 + { 27 + void __iomem *roff = AU1300_GPIC_ADDR; 28 + int bit; 29 + 30 + gpio -= AU1300_GPIO_BASE; 31 + roff += GPIC_GPIO_BANKOFF(gpio); 32 + bit = GPIC_GPIO_TO_BIT(gpio); 33 + return __raw_readl(roff + AU1300_GPIC_PINVAL) & bit; 34 + } 35 + 36 + static inline int au1300_gpio_direction_input(unsigned int gpio) 37 + { 38 + void __iomem *roff = AU1300_GPIC_ADDR; 39 + unsigned long bit; 40 + 41 + gpio -= AU1300_GPIO_BASE; 42 + 43 + roff += GPIC_GPIO_BANKOFF(gpio); 44 + bit = GPIC_GPIO_TO_BIT(gpio); 45 + __raw_writel(bit, roff + AU1300_GPIC_DEVCLR); 46 + wmb(); 47 + 48 + return 0; 49 + } 50 + 51 + static inline int au1300_gpio_set_value(unsigned int gpio, int v) 52 + { 53 + void __iomem *roff = AU1300_GPIC_ADDR; 54 + unsigned long bit; 55 + 56 + gpio -= AU1300_GPIO_BASE; 57 + 58 + roff += GPIC_GPIO_BANKOFF(gpio); 59 + bit = GPIC_GPIO_TO_BIT(gpio); 60 + __raw_writel(bit, roff + (v ? AU1300_GPIC_PINVAL 61 + : AU1300_GPIC_PINVALCLR)); 62 + wmb(); 63 + 64 + return 0; 65 + } 66 + 67 + static inline int au1300_gpio_direction_output(unsigned int gpio, int v) 68 + { 69 + /* hw switches to output automatically */ 70 + return au1300_gpio_set_value(gpio, v); 71 + } 72 + 73 + static inline int au1300_gpio_to_irq(unsigned int gpio) 74 + { 75 + return AU1300_FIRST_INT + (gpio - AU1300_GPIO_BASE); 76 + } 77 + 78 + static inline int au1300_irq_to_gpio(unsigned int irq) 79 + { 80 + return (irq - AU1300_FIRST_INT) + AU1300_GPIO_BASE; 81 + } 82 + 83 + static inline int au1300_gpio_is_valid(unsigned int gpio) 84 + { 85 + int ret; 86 + 87 + switch (alchemy_get_cputype()) { 88 + case ALCHEMY_CPU_AU1300: 89 + ret = ((gpio >= AU1300_GPIO_BASE) && (gpio <= AU1300_GPIO_MAX)); 90 + break; 91 + default: 92 + ret = 0; 93 + } 94 + return ret; 95 + } 96 + 97 + static inline int au1300_gpio_cansleep(unsigned int gpio) 98 + { 99 + return 0; 100 + } 101 + 102 + /* hardware remembers gpio 0-63 levels on powerup */ 103 + static inline int au1300_gpio_getinitlvl(unsigned int gpio) 104 + { 105 + void __iomem *roff = AU1300_GPIC_ADDR; 106 + unsigned long v; 107 + 108 + if (unlikely(gpio > 63)) 109 + return 0; 110 + else if (gpio > 31) { 111 + gpio -= 32; 112 + roff += 4; 113 + } 114 + 115 + v = __raw_readl(roff + AU1300_GPIC_RSTVAL); 116 + return (v >> gpio) & 1; 117 + } 118 + 119 + /**********************************************************************/ 120 + 121 + /* Linux gpio framework integration. 122 + * 123 + * 4 use cases of Alchemy GPIOS: 124 + *(1) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=y: 125 + * Board must register gpiochips. 126 + *(2) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=n: 127 + * A gpiochip for the 75 GPIOs is registered. 128 + * 129 + *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: 130 + * the boards' gpio.h must provide the linux gpio wrapper functions, 131 + * 132 + *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: 133 + * inlinable gpio functions are provided which enable access to the 134 + * Au1300 gpios only by using the numbers straight out of the data- 135 + * sheets. 136 + 137 + * Cases 1 and 3 are intended for boards which want to provide their own 138 + * GPIO namespace and -operations (i.e. for example you have 8 GPIOs 139 + * which are in part provided by spare Au1300 GPIO pins and in part by 140 + * an external FPGA but you still want them to be accssible in linux 141 + * as gpio0-7. The board can of course use the alchemy_gpioX_* functions 142 + * as required). 143 + */ 144 + 145 + #ifndef CONFIG_GPIOLIB 146 + 147 + #ifdef CONFIG_ALCHEMY_GPIOINT_AU1300 148 + 149 + #ifndef CONFIG_ALCHEMY_GPIO_INDIRECT /* case (4) */ 150 + 151 + static inline int gpio_direction_input(unsigned int gpio) 152 + { 153 + return au1300_gpio_direction_input(gpio); 154 + } 155 + 156 + static inline int gpio_direction_output(unsigned int gpio, int v) 157 + { 158 + return au1300_gpio_direction_output(gpio, v); 159 + } 160 + 161 + static inline int gpio_get_value(unsigned int gpio) 162 + { 163 + return au1300_gpio_get_value(gpio); 164 + } 165 + 166 + static inline void gpio_set_value(unsigned int gpio, int v) 167 + { 168 + au1300_gpio_set_value(gpio, v); 169 + } 170 + 171 + static inline int gpio_get_value_cansleep(unsigned gpio) 172 + { 173 + return gpio_get_value(gpio); 174 + } 175 + 176 + static inline void gpio_set_value_cansleep(unsigned gpio, int value) 177 + { 178 + gpio_set_value(gpio, value); 179 + } 180 + 181 + static inline int gpio_is_valid(unsigned int gpio) 182 + { 183 + return au1300_gpio_is_valid(gpio); 184 + } 185 + 186 + static inline int gpio_cansleep(unsigned int gpio) 187 + { 188 + return au1300_gpio_cansleep(gpio); 189 + } 190 + 191 + static inline int gpio_to_irq(unsigned int gpio) 192 + { 193 + return au1300_gpio_to_irq(gpio); 194 + } 195 + 196 + static inline int irq_to_gpio(unsigned int irq) 197 + { 198 + return au1300_irq_to_gpio(irq); 199 + } 200 + 201 + static inline int gpio_request(unsigned int gpio, const char *label) 202 + { 203 + return 0; 204 + } 205 + 206 + static inline void gpio_free(unsigned int gpio) 207 + { 208 + } 209 + 210 + static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) 211 + { 212 + return -ENOSYS; 213 + } 214 + 215 + static inline void gpio_unexport(unsigned gpio) 216 + { 217 + } 218 + 219 + static inline int gpio_export(unsigned gpio, bool direction_may_change) 220 + { 221 + return -ENOSYS; 222 + } 223 + 224 + static inline int gpio_sysfs_set_active_low(unsigned gpio, int value) 225 + { 226 + return -ENOSYS; 227 + } 228 + 229 + static inline int gpio_export_link(struct device *dev, const char *name, 230 + unsigned gpio) 231 + { 232 + return -ENOSYS; 233 + } 234 + 235 + #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ 236 + 237 + #endif /* CONFIG_ALCHEMY_GPIOINT_AU1300 */ 238 + 239 + #endif /* CONFIG GPIOLIB */ 240 + 241 + #endif /* _GPIO_AU1300_H_ */
+3
arch/mips/include/asm/mach-au1x00/gpio.h
··· 12 12 13 13 #include <asm/mach-au1x00/au1000.h> 14 14 #include <asm/mach-au1x00/gpio-au1000.h> 15 + #include <asm/mach-au1x00/gpio-au1300.h> 15 16 16 17 /* On Au1000, Au1500 and Au1100 GPIOs won't work as inputs before 17 18 * SYS_PININPUTEN is written to at least once. On Au1550/Au1200/Au1300 this ··· 59 58 switch (alchemy_get_cputype()) { 60 59 case ALCHEMY_CPU_AU1000...ALCHEMY_CPU_AU1200: 61 60 return alchemy_irq_to_gpio(irq); 61 + case ALCHEMY_CPU_AU1300: 62 + return au1300_irq_to_gpio(irq); 62 63 } 63 64 return -EINVAL; 64 65 }
+7
arch/mips/kernel/cpu-probe.c
··· 1014 1014 { 1015 1015 decode_configs(c); 1016 1016 1017 + if ((c->processor_id & 0xff00) == PRID_IMP_NETLOGIC_AU13XX) { 1018 + c->cputype = CPU_ALCHEMY; 1019 + __cpu_name[cpu] = "Au1300"; 1020 + /* following stuff is not for Alchemy */ 1021 + return; 1022 + } 1023 + 1017 1024 c->options = (MIPS_CPU_TLB | 1018 1025 MIPS_CPU_4KEX | 1019 1026 MIPS_CPU_COUNTER |
+2 -2
drivers/i2c/busses/Kconfig
··· 299 299 unless your system can cope with those limitations. 300 300 301 301 config I2C_AU1550 302 - tristate "Au1550/Au1200 SMBus interface" 302 + tristate "Au1550/Au1200/Au1300 SMBus interface" 303 303 depends on MIPS_ALCHEMY 304 304 help 305 305 If you say yes to this option, support will be included for the 306 - Au1550 and Au1200 SMBus interface. 306 + Au1550/Au1200/Au1300 SMBus interface. 307 307 308 308 This driver can also be built as a module. If so, the module 309 309 will be called i2c-au1550.
+32 -21
drivers/mmc/host/au1xmmc.c
··· 153 153 { 154 154 switch (alchemy_get_cputype()) { 155 155 case ALCHEMY_CPU_AU1200: 156 + case ALCHEMY_CPU_AU1300: 156 157 return 1; 157 158 default: 158 159 return 0; ··· 769 768 770 769 config2 = au_readl(HOST_CONFIG2(host)); 771 770 switch (ios->bus_width) { 771 + case MMC_BUS_WIDTH_8: 772 + config2 |= SD_CONFIG2_BB; 773 + break; 772 774 case MMC_BUS_WIDTH_4: 775 + config2 &= ~SD_CONFIG2_BB; 773 776 config2 |= SD_CONFIG2_WB; 774 777 break; 775 778 case MMC_BUS_WIDTH_1: 776 - config2 &= ~SD_CONFIG2_WB; 779 + config2 &= ~(SD_CONFIG2_WB | SD_CONFIG2_BB); 777 780 break; 778 781 } 779 782 au_writel(config2, HOST_CONFIG2(host)); ··· 948 943 struct mmc_host *mmc; 949 944 struct au1xmmc_host *host; 950 945 struct resource *r; 951 - int ret; 946 + int ret, iflag; 952 947 953 948 mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); 954 949 if (!mmc) { ··· 987 982 dev_err(&pdev->dev, "no IRQ defined\n"); 988 983 goto out3; 989 984 } 990 - 991 985 host->irq = r->start; 992 - /* IRQ is shared among both SD controllers */ 993 - ret = request_irq(host->irq, au1xmmc_irq, IRQF_SHARED, 994 - DRIVER_NAME, host); 995 - if (ret) { 996 - dev_err(&pdev->dev, "cannot grab IRQ\n"); 997 - goto out3; 998 - } 999 986 1000 987 mmc->ops = &au1xmmc_ops; 1001 988 1002 989 mmc->f_min = 450000; 1003 990 mmc->f_max = 24000000; 1004 991 1005 - switch (alchemy_get_cputype()) { 1006 - case ALCHEMY_CPU_AU1100: 1007 - mmc->max_seg_size = AU1100_MMC_DESCRIPTOR_SIZE; 1008 - mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT; 1009 - break; 1010 - case ALCHEMY_CPU_AU1200: 1011 - mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; 1012 - mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT; 1013 - break; 1014 - } 1015 - 1016 992 mmc->max_blk_size = 2048; 1017 993 mmc->max_blk_count = 512; 1018 994 1019 995 mmc->ocr_avail = AU1XMMC_OCR; 1020 996 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; 997 + mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT; 998 + 999 + iflag = IRQF_SHARED; /* Au1100/Au1200: one int for both ctrls */ 1000 + 1001 + switch (alchemy_get_cputype()) { 1002 + case ALCHEMY_CPU_AU1100: 1003 + mmc->max_seg_size = AU1100_MMC_DESCRIPTOR_SIZE; 1004 + break; 1005 + case ALCHEMY_CPU_AU1200: 1006 + mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; 1007 + break; 1008 + case ALCHEMY_CPU_AU1300: 1009 + iflag = 0; /* nothing is shared */ 1010 + mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; 1011 + mmc->f_max = 52000000; 1012 + if (host->ioarea->start == AU1100_SD0_PHYS_ADDR) 1013 + mmc->caps |= MMC_CAP_8_BIT_DATA; 1014 + break; 1015 + } 1016 + 1017 + ret = request_irq(host->irq, au1xmmc_irq, iflag, DRIVER_NAME, host); 1018 + if (ret) { 1019 + dev_err(&pdev->dev, "cannot grab IRQ\n"); 1020 + goto out3; 1021 + } 1021 1022 1022 1023 host->status = HOST_S_IDLE; 1023 1024
+2 -2
drivers/spi/Kconfig
··· 87 87 Enable support for a SPI bus via the Blackfin SPORT peripheral. 88 88 89 89 config SPI_AU1550 90 - tristate "Au1550/Au12x0 SPI Controller" 90 + tristate "Au1550/Au1200/Au1300 SPI Controller" 91 91 depends on MIPS_ALCHEMY && EXPERIMENTAL 92 92 select SPI_BITBANG 93 93 help 94 94 If you say yes to this option, support will be included for the 95 - Au1550 SPI controller (may also work with Au1200,Au1210,Au1250). 95 + PSC SPI controller found on Au1550, Au1200 and Au1300 series. 96 96 97 97 config SPI_BITBANG 98 98 tristate "Utilities for Bitbanging SPI masters"
+277
drivers/usb/host/alchemy-common.c
··· 52 52 USBCFG_EBE | USBCFG_EME | USBCFG_OBE | \ 53 53 USBCFG_OME) 54 54 55 + /* Au1300 USB config registers */ 56 + #define USB_DWC_CTRL1 0x00 57 + #define USB_DWC_CTRL2 0x04 58 + #define USB_VBUS_TIMER 0x10 59 + #define USB_SBUS_CTRL 0x14 60 + #define USB_MSR_ERR 0x18 61 + #define USB_DWC_CTRL3 0x1C 62 + #define USB_DWC_CTRL4 0x20 63 + #define USB_OTG_STATUS 0x28 64 + #define USB_DWC_CTRL5 0x2C 65 + #define USB_DWC_CTRL6 0x30 66 + #define USB_DWC_CTRL7 0x34 67 + #define USB_PHY_STATUS 0xC0 68 + #define USB_INT_STATUS 0xC4 69 + #define USB_INT_ENABLE 0xC8 70 + 71 + #define USB_DWC_CTRL1_OTGD 0x04 /* set to DISable OTG */ 72 + #define USB_DWC_CTRL1_HSTRS 0x02 /* set to ENable EHCI */ 73 + #define USB_DWC_CTRL1_DCRS 0x01 /* set to ENable UDC */ 74 + 75 + #define USB_DWC_CTRL2_PHY1RS 0x04 /* set to enable PHY1 */ 76 + #define USB_DWC_CTRL2_PHY0RS 0x02 /* set to enable PHY0 */ 77 + #define USB_DWC_CTRL2_PHYRS 0x01 /* set to enable PHY */ 78 + 79 + #define USB_DWC_CTRL3_OHCI1_CKEN (1 << 19) 80 + #define USB_DWC_CTRL3_OHCI0_CKEN (1 << 18) 81 + #define USB_DWC_CTRL3_EHCI0_CKEN (1 << 17) 82 + #define USB_DWC_CTRL3_OTG0_CKEN (1 << 16) 83 + 84 + #define USB_SBUS_CTRL_SBCA 0x04 /* coherent access */ 85 + 86 + #define USB_INTEN_FORCE 0x20 87 + #define USB_INTEN_PHY 0x10 88 + #define USB_INTEN_UDC 0x08 89 + #define USB_INTEN_EHCI 0x04 90 + #define USB_INTEN_OHCI1 0x02 91 + #define USB_INTEN_OHCI0 0x01 55 92 56 93 static DEFINE_SPINLOCK(alchemy_usb_lock); 57 94 95 + static inline void __au1300_usb_phyctl(void __iomem *base, int enable) 96 + { 97 + unsigned long r, s; 98 + 99 + r = __raw_readl(base + USB_DWC_CTRL2); 100 + s = __raw_readl(base + USB_DWC_CTRL3); 101 + 102 + s &= USB_DWC_CTRL3_OHCI1_CKEN | USB_DWC_CTRL3_OHCI0_CKEN | 103 + USB_DWC_CTRL3_EHCI0_CKEN | USB_DWC_CTRL3_OTG0_CKEN; 104 + 105 + if (enable) { 106 + /* simply enable all PHYs */ 107 + r |= USB_DWC_CTRL2_PHY1RS | USB_DWC_CTRL2_PHY0RS | 108 + USB_DWC_CTRL2_PHYRS; 109 + __raw_writel(r, base + USB_DWC_CTRL2); 110 + wmb(); 111 + } else if (!s) { 112 + /* no USB block active, do disable all PHYs */ 113 + r &= ~(USB_DWC_CTRL2_PHY1RS | USB_DWC_CTRL2_PHY0RS | 114 + USB_DWC_CTRL2_PHYRS); 115 + __raw_writel(r, base + USB_DWC_CTRL2); 116 + wmb(); 117 + } 118 + } 119 + 120 + static inline void __au1300_ohci_control(void __iomem *base, int enable, int id) 121 + { 122 + unsigned long r; 123 + 124 + if (enable) { 125 + __raw_writel(1, base + USB_DWC_CTRL7); /* start OHCI clock */ 126 + wmb(); 127 + 128 + r = __raw_readl(base + USB_DWC_CTRL3); /* enable OHCI block */ 129 + r |= (id == 0) ? USB_DWC_CTRL3_OHCI0_CKEN 130 + : USB_DWC_CTRL3_OHCI1_CKEN; 131 + __raw_writel(r, base + USB_DWC_CTRL3); 132 + wmb(); 133 + 134 + __au1300_usb_phyctl(base, enable); /* power up the PHYs */ 135 + 136 + r = __raw_readl(base + USB_INT_ENABLE); 137 + r |= (id == 0) ? USB_INTEN_OHCI0 : USB_INTEN_OHCI1; 138 + __raw_writel(r, base + USB_INT_ENABLE); 139 + wmb(); 140 + 141 + /* reset the OHCI start clock bit */ 142 + __raw_writel(0, base + USB_DWC_CTRL7); 143 + wmb(); 144 + } else { 145 + r = __raw_readl(base + USB_INT_ENABLE); 146 + r &= ~((id == 0) ? USB_INTEN_OHCI0 : USB_INTEN_OHCI1); 147 + __raw_writel(r, base + USB_INT_ENABLE); 148 + wmb(); 149 + 150 + r = __raw_readl(base + USB_DWC_CTRL3); 151 + r &= ~((id == 0) ? USB_DWC_CTRL3_OHCI0_CKEN 152 + : USB_DWC_CTRL3_OHCI1_CKEN); 153 + __raw_writel(r, base + USB_DWC_CTRL3); 154 + wmb(); 155 + 156 + __au1300_usb_phyctl(base, enable); 157 + } 158 + } 159 + 160 + static inline void __au1300_ehci_control(void __iomem *base, int enable) 161 + { 162 + unsigned long r; 163 + 164 + if (enable) { 165 + r = __raw_readl(base + USB_DWC_CTRL3); 166 + r |= USB_DWC_CTRL3_EHCI0_CKEN; 167 + __raw_writel(r, base + USB_DWC_CTRL3); 168 + wmb(); 169 + 170 + r = __raw_readl(base + USB_DWC_CTRL1); 171 + r |= USB_DWC_CTRL1_HSTRS; 172 + __raw_writel(r, base + USB_DWC_CTRL1); 173 + wmb(); 174 + 175 + __au1300_usb_phyctl(base, enable); 176 + 177 + r = __raw_readl(base + USB_INT_ENABLE); 178 + r |= USB_INTEN_EHCI; 179 + __raw_writel(r, base + USB_INT_ENABLE); 180 + wmb(); 181 + } else { 182 + r = __raw_readl(base + USB_INT_ENABLE); 183 + r &= ~USB_INTEN_EHCI; 184 + __raw_writel(r, base + USB_INT_ENABLE); 185 + wmb(); 186 + 187 + r = __raw_readl(base + USB_DWC_CTRL1); 188 + r &= ~USB_DWC_CTRL1_HSTRS; 189 + __raw_writel(r, base + USB_DWC_CTRL1); 190 + wmb(); 191 + 192 + r = __raw_readl(base + USB_DWC_CTRL3); 193 + r &= ~USB_DWC_CTRL3_EHCI0_CKEN; 194 + __raw_writel(r, base + USB_DWC_CTRL3); 195 + wmb(); 196 + 197 + __au1300_usb_phyctl(base, enable); 198 + } 199 + } 200 + 201 + static inline void __au1300_udc_control(void __iomem *base, int enable) 202 + { 203 + unsigned long r; 204 + 205 + if (enable) { 206 + r = __raw_readl(base + USB_DWC_CTRL1); 207 + r |= USB_DWC_CTRL1_DCRS; 208 + __raw_writel(r, base + USB_DWC_CTRL1); 209 + wmb(); 210 + 211 + __au1300_usb_phyctl(base, enable); 212 + 213 + r = __raw_readl(base + USB_INT_ENABLE); 214 + r |= USB_INTEN_UDC; 215 + __raw_writel(r, base + USB_INT_ENABLE); 216 + wmb(); 217 + } else { 218 + r = __raw_readl(base + USB_INT_ENABLE); 219 + r &= ~USB_INTEN_UDC; 220 + __raw_writel(r, base + USB_INT_ENABLE); 221 + wmb(); 222 + 223 + r = __raw_readl(base + USB_DWC_CTRL1); 224 + r &= ~USB_DWC_CTRL1_DCRS; 225 + __raw_writel(r, base + USB_DWC_CTRL1); 226 + wmb(); 227 + 228 + __au1300_usb_phyctl(base, enable); 229 + } 230 + } 231 + 232 + static inline void __au1300_otg_control(void __iomem *base, int enable) 233 + { 234 + unsigned long r; 235 + if (enable) { 236 + r = __raw_readl(base + USB_DWC_CTRL3); 237 + r |= USB_DWC_CTRL3_OTG0_CKEN; 238 + __raw_writel(r, base + USB_DWC_CTRL3); 239 + wmb(); 240 + 241 + r = __raw_readl(base + USB_DWC_CTRL1); 242 + r &= ~USB_DWC_CTRL1_OTGD; 243 + __raw_writel(r, base + USB_DWC_CTRL1); 244 + wmb(); 245 + 246 + __au1300_usb_phyctl(base, enable); 247 + } else { 248 + r = __raw_readl(base + USB_DWC_CTRL1); 249 + r |= USB_DWC_CTRL1_OTGD; 250 + __raw_writel(r, base + USB_DWC_CTRL1); 251 + wmb(); 252 + 253 + r = __raw_readl(base + USB_DWC_CTRL3); 254 + r &= ~USB_DWC_CTRL3_OTG0_CKEN; 255 + __raw_writel(r, base + USB_DWC_CTRL3); 256 + wmb(); 257 + 258 + __au1300_usb_phyctl(base, enable); 259 + } 260 + } 261 + 262 + static inline int au1300_usb_control(int block, int enable) 263 + { 264 + void __iomem *base = 265 + (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR); 266 + int ret = 0; 267 + 268 + switch (block) { 269 + case ALCHEMY_USB_OHCI0: 270 + __au1300_ohci_control(base, enable, 0); 271 + break; 272 + case ALCHEMY_USB_OHCI1: 273 + __au1300_ohci_control(base, enable, 1); 274 + break; 275 + case ALCHEMY_USB_EHCI0: 276 + __au1300_ehci_control(base, enable); 277 + break; 278 + case ALCHEMY_USB_UDC0: 279 + __au1300_udc_control(base, enable); 280 + break; 281 + case ALCHEMY_USB_OTG0: 282 + __au1300_otg_control(base, enable); 283 + break; 284 + default: 285 + ret = -ENODEV; 286 + } 287 + return ret; 288 + } 289 + 290 + static inline void au1300_usb_init(void) 291 + { 292 + void __iomem *base = 293 + (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR); 294 + 295 + /* set some sane defaults. Note: we don't fiddle with DWC_CTRL4 296 + * here at all: Port 2 routing (EHCI or UDC) must be set either 297 + * by boot firmware or platform init code; I can't autodetect 298 + * a sane setting. 299 + */ 300 + __raw_writel(0, base + USB_INT_ENABLE); /* disable all USB irqs */ 301 + wmb(); 302 + __raw_writel(0, base + USB_DWC_CTRL3); /* disable all clocks */ 303 + wmb(); 304 + __raw_writel(~0, base + USB_MSR_ERR); /* clear all errors */ 305 + wmb(); 306 + __raw_writel(~0, base + USB_INT_STATUS); /* clear int status */ 307 + wmb(); 308 + /* set coherent access bit */ 309 + __raw_writel(USB_SBUS_CTRL_SBCA, base + USB_SBUS_CTRL); 310 + wmb(); 311 + } 58 312 59 313 static inline void __au1200_ohci_control(void __iomem *base, int enable) 60 314 { ··· 487 233 case ALCHEMY_CPU_AU1200: 488 234 ret = au1200_usb_control(block, enable); 489 235 break; 236 + case ALCHEMY_CPU_AU1300: 237 + ret = au1300_usb_control(block, enable); 238 + break; 490 239 default: 491 240 ret = -ENODEV; 492 241 } ··· 538 281 } 539 282 } 540 283 284 + static void au1300_usb_pm(int susp) 285 + { 286 + void __iomem *base = 287 + (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR); 288 + /* remember Port2 routing */ 289 + if (susp) { 290 + alchemy_usb_pmdata[0] = __raw_readl(base + USB_DWC_CTRL4); 291 + } else { 292 + au1300_usb_init(); 293 + __raw_writel(alchemy_usb_pmdata[0], base + USB_DWC_CTRL4); 294 + wmb(); 295 + } 296 + } 297 + 541 298 static void alchemy_usb_pm(int susp) 542 299 { 543 300 switch (alchemy_get_cputype()) { ··· 565 294 break; 566 295 case ALCHEMY_CPU_AU1200: 567 296 au1200_usb_pm(susp); 297 + break; 298 + case ALCHEMY_CPU_AU1300: 299 + au1300_usb_pm(susp); 568 300 break; 569 301 } 570 302 } ··· 601 327 break; 602 328 case ALCHEMY_CPU_AU1200: 603 329 au1200_usb_init(); 330 + break; 331 + case ALCHEMY_CPU_AU1300: 332 + au1300_usb_init(); 604 333 break; 605 334 } 606 335
+9 -4
drivers/usb/host/ohci-au1xxx.c
··· 89 89 90 90 static int ohci_hcd_au1xxx_drv_probe(struct platform_device *pdev) 91 91 { 92 - int ret; 92 + int ret, unit; 93 93 struct usb_hcd *hcd; 94 94 95 95 if (usb_disabled()) ··· 120 120 goto err2; 121 121 } 122 122 123 - if (alchemy_usb_control(ALCHEMY_USB_OHCI0, 1)) { 123 + unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ? 124 + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0; 125 + if (alchemy_usb_control(unit, 1)) { 124 126 printk(KERN_INFO "%s: controller init failed!\n", pdev->name); 125 127 ret = -ENODEV; 126 128 goto err3; ··· 137 135 return ret; 138 136 } 139 137 140 - alchemy_usb_control(ALCHEMY_USB_OHCI0, 0); 138 + alchemy_usb_control(unit, 0); 141 139 err3: 142 140 iounmap(hcd->regs); 143 141 err2: ··· 150 148 static int ohci_hcd_au1xxx_drv_remove(struct platform_device *pdev) 151 149 { 152 150 struct usb_hcd *hcd = platform_get_drvdata(pdev); 151 + int unit; 153 152 153 + unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ? 154 + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0; 154 155 usb_remove_hcd(hcd); 155 - alchemy_usb_control(ALCHEMY_USB_OHCI0, 0); 156 + alchemy_usb_control(unit, 0); 156 157 iounmap(hcd->regs); 157 158 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); 158 159 usb_put_hcd(hcd);
+4 -4
drivers/video/Kconfig
··· 1763 1763 au1100fb:panel=<name>. 1764 1764 1765 1765 config FB_AU1200 1766 - bool "Au1200 LCD Driver" 1766 + bool "Au1200/Au1300 LCD Driver" 1767 1767 depends on (FB = y) && MIPS_ALCHEMY 1768 1768 select FB_SYS_FILLRECT 1769 1769 select FB_SYS_COPYAREA 1770 1770 select FB_SYS_IMAGEBLIT 1771 1771 select FB_SYS_FOPS 1772 1772 help 1773 - This is the framebuffer driver for the AMD Au1200 SOC. It can drive 1774 - various panels and CRTs by passing in kernel cmd line option 1775 - au1200fb:panel=<name>. 1773 + This is the framebuffer driver for the Au1200/Au1300 SOCs. 1774 + It can drive various panels and CRTs by passing in kernel cmd line 1775 + option au1200fb:panel=<name>. 1776 1776 1777 1777 config FB_VT8500 1778 1778 bool "VT8500 LCD Driver"
+3 -3
sound/soc/au1x/Kconfig
··· 1 1 ## 2 - ## Au1200/Au1550 PSC + DBDMA 2 + ## Au1200/Au1550/Au1300 PSC + DBDMA 3 3 ## 4 4 config SND_SOC_AU1XPSC 5 - tristate "SoC Audio for Au1200/Au1250/Au1550" 5 + tristate "SoC Audio for Au12xx/Au13xx/Au1550" 6 6 depends on MIPS_ALCHEMY 7 7 help 8 8 This option enables support for the Programmable Serial 9 9 Controllers in AC97 and I2S mode, and the Descriptor-Based DMA 10 - Controller (DBDMA) as found on the Au1200/Au1250/Au1550 SoC. 10 + Controller (DBDMA) as found on the Au12xx/Au13xx/Au1550 SoC. 11 11 12 12 config SND_SOC_AU1XPSC_I2S 13 13 tristate