diff options
Diffstat (limited to 'target/linux/adm8668/files/arch/mips/include')
4 files changed, 90 insertions, 93 deletions
diff --git a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/adm8668.h b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/adm8668.h index 2cf65d81a..8a16863c0 100644 --- a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/adm8668.h +++ b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/adm8668.h @@ -9,8 +9,6 @@ #ifndef __ADM8668_H__ #define __ADM8668_H__ -#define SYS_CLOCK 175000000 - /*======================= Physical Memory Map ============================*/ #define ADM8668_SDRAM_BASE 0 #define ADM8668_SMEM1_BASE 0x10000000 @@ -26,71 +24,28 @@ #define ADM8668_SMEM0_BASE 0x1FC00000 #define ADM8668_NAND_BASE 0x1FFFFF00 -#define PCICFG_BASE 0x12200000 -#define PCIDAT_BASE 0x12400000 - -/** onboard uart **/ -#define ADM8668_UARTCLK_FREQ 62500000 -/* registers */ -#define UART_DR_REG 0x00 -#define UART_RSR_REG 0x04 -#define UART_CR_REG 0x14 -#define UART_FR_REG 0x18 -#define UART_IIR_REG 0x1C - -/* rsr reg */ -#define UART_FRAMING_ERR 0x01 -#define UART_PARITY_ERR 0x02 -#define UART_BREAK_ERR 0x04 -#define UART_OVERRUN_ERR 0x08 -#define UART_RX_STATUS_MASK 0x0F - -/* cr reg */ -#define UART_RX_INT_EN 0x10 -#define UART_TX_INT_EN 0x20 -#define UART_RX_TIMEOUT_INT_EN 0x40 - -/* fr reg */ -#define UART_RX_FIFO_EMPTY 0x10 -#define UART_TX_FIFO_FULL 0x20 - -/* iir reg */ -#define UART_RX_INT 0x02 -#define UART_TX_INT 0x04 -#define UART_RX_TIMEOUT_INT 0x08 - -/* interrupt controller */ -#define IRQ_STATUS_REG 0x00 /* Read */ -#define IRQ_ENABLE_REG 0x08 /* Read/Write */ -#define IRQ_DISABLE_REG 0x0C /* Write */ +#define ADM8668_PCICFG_BASE 0x12200000 +#define ADM8668_PCIDAT_BASE 0x12400000 /* interrupt levels */ -#define INT_LVL_SWI 1 -#define INT_LVL_COMMS_RX 2 -#define INT_LVL_COMMS_TX 3 -#define INT_LVL_TIMERINT0 4 -#define INT_LVL_TIMERINT1 5 -#define INT_LVL_UART0 6 -#define INT_LVL_LAN 7 -#define INT_LVL_WAN 8 -#define INT_LVL_WLAN 9 -#define INT_LVL_GPIO 10 -#define INT_LVL_IDE 11 -#define INT_LVL_PCI2 12 -#define INT_LVL_PCI1 13 -#define INT_LVL_PCI0 14 -#define INT_LVL_USB 15 -#define INT_LVL_MAX INT_LVL_USB +#define ADM8668_SWI_IRQ 1 +#define ADM8668_COMMS_RX_IRQ 2 +#define ADM8668_COMMS_TX_IRQ 3 +#define ADM8668_TIMER0_IRQ 4 +#define ADM8668_TIMER1_IRQ 5 +#define ADM8668_UART0_IRQ 6 +#define ADM8668_LAN_IRQ 7 +#define ADM8668_WAN_IRQ 8 +#define ADM8668_WLAN_IRQ 9 +#define ADM8668_GPIO_IRQ 10 +#define ADM8668_IDE_IRQ 11 +#define ADM8668_PCI2_IRQ 12 +#define ADM8668_PCI1_IRQ 13 +#define ADM8668_PCI0_IRQ 14 +#define ADM8668_USB_IRQ 15 +#define ADM8668_IRQ_MAX ADM8668_USB_IRQ /* register access macros */ -#define ADM8668_INTC_REG(_reg) \ - (*((volatile unsigned long *)(KSEG1ADDR(ADM8668_INTC_BASE + (_reg))))) -#define ADM8668_LAN_REG(_reg) \ - (*((volatile unsigned int *)(KSEG1ADDR(ADM8668_LAN_BASE + (_reg))))) -#define ADM8668_WAN_REG(_reg) \ - (*((volatile unsigned int *)(KSEG1ADDR(ADM8668_WAN_BASE + (_reg))))) -#define ADM8668_WLAN_REG(_reg) \ - (*((volatile unsigned int *)(KSEG1ADDR(ADM8668_WLAN_BASE + (_reg))))) #define ADM8668_CONFIG_REG(_reg) \ (*((volatile unsigned int *)(KSEG1ADDR(ADM8668_CONFIG_BASE + (_reg))))) @@ -103,37 +58,12 @@ #define ADM8668_CR0 0x00 #define ADM8668_CR1 0x04 #define ADM8668_CR3 0x0C +#define ADM8668_CR66 0x108 /** For GPIO control **/ #define GPIO_REG 0x5C /* on WLAN */ #define CRGPIO_REG 0x20 /* on CPU */ -#define GPIO0_OUTPUT_ENABLE 0x1000 -#define GPIO1_OUTPUT_ENABLE 0x2000 -#define GPIO2_OUTPUT_ENABLE 0x4000 -#define GPIO_OUTPUT_ENABLE_ALL 0x7000 -#define GPIO0_OUTPUT_1 0x40 -#define GPIO1_OUTPUT_1 0x80 -#define GPIO2_OUTPUT_1 0x100 -#define GPIO0_INPUT_1 0x1 -#define GPIO1_INPUT_1 0x2 -#define GPIO2_INPUT_1 0x4 - -#define GPIO_SET_HI(num) \ - ADM8668_WLAN_REG(GPIO_REG) |= (1 << (6 + num)) - -#define GPIO_SET_LOW(num) \ - ADM8668_WLAN_REG(GPIO_REG) &= ~(1 << (6 + num)) - -#define GPIO_TOGGLE(num) \ - ADM8668_WLAN_REG(GPIO_REG) ^= (1 << (6 + num)) - -#define CRGPIO_SET_HI(num) \ - ADM8668_CONFIG_REG(CRGPIO_REG) |= (1 << (6 + num)) - -#define CRGPIO_SET_LOW(num) \ - ADM8668_CONFIG_REG(CRGPIO_REG) &= ~(1 << (6 + num)) -#define CRGPIO_TOGGLE(num) \ - ADM8668_CONFIG_REG(CRGPIO_REG) ^= (1 << (6 + num)) +void adm8668_init_clocks(void); #endif /* __ADM8668_H__ */ diff --git a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/asm/sizes.h b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/asm/sizes.h new file mode 100644 index 000000000..503843db1 --- /dev/null +++ b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/asm/sizes.h @@ -0,0 +1,56 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* DO NOT EDIT!! - this file automatically generated + * from .s file by awk -f s2h.awk + */ +/* Size definitions + * Copyright (C) ARM Limited 1998. All rights reserved. + */ + +#ifndef __sizes_h +#define __sizes_h 1 + +/* handy sizes */ +#define SZ_16 0x00000010 +#define SZ_256 0x00000100 +#define SZ_512 0x00000200 + +#define SZ_1K 0x00000400 +#define SZ_4K 0x00001000 +#define SZ_8K 0x00002000 +#define SZ_16K 0x00004000 +#define SZ_64K 0x00010000 +#define SZ_128K 0x00020000 +#define SZ_256K 0x00040000 +#define SZ_512K 0x00080000 + +#define SZ_1M 0x00100000 +#define SZ_2M 0x00200000 +#define SZ_4M 0x00400000 +#define SZ_8M 0x00800000 +#define SZ_16M 0x01000000 +#define SZ_32M 0x02000000 +#define SZ_64M 0x04000000 +#define SZ_128M 0x08000000 +#define SZ_256M 0x10000000 +#define SZ_512M 0x20000000 + +#define SZ_1G 0x40000000 +#define SZ_2G 0x80000000 + +#endif + +/* END */ diff --git a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/gpio.h b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/gpio.h new file mode 100644 index 000000000..b0473fc4b --- /dev/null +++ b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/gpio.h @@ -0,0 +1,13 @@ +#ifndef __ADM8668_GPIO_H__ +#define __ADM8668_GPIO_H__ + +#define gpio_to_irq(gpio) -1 + +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value + +#define gpio_cansleep __gpio_cansleep + +#include <asm-generic/gpio.h> + +#endif diff --git a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/irq.h b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/irq.h index 1341309f2..ea859f03a 100644 --- a/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/irq.h +++ b/target/linux/adm8668/files/arch/mips/include/asm/mach-adm8668/irq.h @@ -8,9 +8,7 @@ #ifndef __ASM_MACH_ADM8668_IRQ_H #define __ASM_MACH_ADM8668_IRQ_H -#define NR_IRQS 32 +#define NR_IRQS 32 #define MIPS_CPU_IRQ_BASE 16 -#define IRQ_MASK 0xffff - #endif /* __ASM_MACH_ADM8668_IRQ_H */ |