diff options
Diffstat (limited to 'target/linux/adm8668/files-3.14/arch/mips/adm8668')
12 files changed, 0 insertions, 754 deletions
diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Kconfig b/target/linux/adm8668/files-3.14/arch/mips/adm8668/Kconfig deleted file mode 100644 index 2e7281ff0a..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Kconfig +++ /dev/null @@ -1,2 +0,0 @@ -config ARM_AMBA - def_bool y diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Makefile b/target/linux/adm8668/files-3.14/arch/mips/adm8668/Makefile deleted file mode 100644 index 515c3a4993..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# -# something witty --neutronscott -# - -obj-y := irq.o prom.o platform.o gpio.o \ - setup.o clock.o time.o early_printk.o \ diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Platform b/target/linux/adm8668/files-3.14/arch/mips/adm8668/Platform deleted file mode 100644 index c70cd270be..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/Platform +++ /dev/null @@ -1,6 +0,0 @@ -# -# Infineon ADM8668 WildPass -# -platform-$(CONFIG_ADM8668) += adm8668/ -cflags-$(CONFIG_ADM8668) += -I$(srctree)/arch/mips/include/asm/mach-adm8668 -load-$(CONFIG_ADM8668) += 0xffffffff80002000 diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/clock.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/clock.c deleted file mode 100644 index 1e010fcc8f..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/clock.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * ADM8668 minimal clock support - * - * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> - * - * Licensed under the terms of the GPLv2 - */ - -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/device.h> -#include <linux/err.h> -#include <linux/clk.h> - -#include <adm8668.h> - -struct clk { - unsigned long rate; -}; - -static struct clk uart_clk = { - .rate = 62500000, -}; - -static struct clk sys_clk; - -struct clk *clk_get(struct device *dev, const char *id) -{ - const char *lookup = id; - - if (dev) - lookup = dev_name(dev); - - if (!strcmp(lookup, "apb:uart0")) - return &uart_clk; - if (!strcmp(lookup, "sys")) - return &sys_clk; - - return ERR_PTR(-ENOENT); -} -EXPORT_SYMBOL(clk_get); - -int clk_enable(struct clk *clk) -{ - return 0; -} -EXPORT_SYMBOL(clk_enable); - -void clk_disable(struct clk *clk) -{ -} -EXPORT_SYMBOL(clk_disable); - -unsigned long clk_get_rate(struct clk *clk) -{ - return clk->rate; -} -EXPORT_SYMBOL(clk_get_rate); - -void clk_put(struct clk *clk) -{ -} -EXPORT_SYMBOL(clk_put); - -void __init adm8668_init_clocks(void) -{ - u32 adj; - - /* adjustable clock selection - * CR3 bit 14~11, 0000 -> 175MHz, 0001 -> 180MHz, etc... - */ - adj = (ADM8668_CONFIG_REG(ADM8668_CR3) >> 11) & 0xf; - sys_clk.rate = 175000000 + (adj * 5000000); - - pr_info("ADM8668 CPU clock: %lu MHz\n", sys_clk.rate / 1000000); -} diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/early_printk.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/early_printk.c deleted file mode 100644 index 03dd72aa8b..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/early_printk.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <linux/io.h> -#include <linux/amba/serial.h> -#include <adm8668.h> - -#define UART_READ(r) \ - __raw_readl((void __iomem *)(KSEG1ADDR(ADM8668_UART0_BASE) + (r))) - -#define UART_WRITE(v, r) \ - __raw_writel((v), (void __iomem *)(KSEG1ADDR(ADM8668_UART0_BASE) + (r))) - -void prom_putchar(char c) -{ - UART_WRITE(c, UART01x_DR); - while ((UART_READ(UART01x_FR) & UART01x_FR_TXFF) != 0) - ; -} diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/gpio.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/gpio.c deleted file mode 100644 index fb39f7f588..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/gpio.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Infineon/ADMTek ADM8668 WildPass GPIO support - * - * Copyright (C) 2012 Florian Fainelli <florian@openwrt.org> - * - * Licensed under the terms of GPLv2. - * - */ -#include <linux/kernel.h> -#include <linux/gpio.h> -#include <linux/io.h> - -#include <adm8668.h> - -#define GPIO_MASK 0x3f - -#define GPIO_IN_OFS 0 -#define GPIO_OUT_OFS 6 -#define GPIO_OE_OFS 12 - -struct adm8668_gpio_chip { - void __iomem *base; - struct gpio_chip chip; -}; - -static int adm8668_gpio_dir_out(struct gpio_chip *chip, - unsigned offset, int value) -{ - struct adm8668_gpio_chip *c = - container_of(chip, struct adm8668_gpio_chip, chip); - u32 mask; - - /* clear input, set output enable and output value */ - mask = __raw_readl(c->base); - mask &= ~(1 << offset); - mask |= (1 << (offset + GPIO_OE_OFS)); - if (value) - mask |= (1 << (offset + GPIO_OUT_OFS)); - else - mask &= ~(1 << (offset + GPIO_OUT_OFS)); - __raw_writel(mask, c->base); - - return 0; -} - -static int adm8668_gpio_dir_in(struct gpio_chip *chip, - unsigned offset) -{ - struct adm8668_gpio_chip *c = - container_of(chip, struct adm8668_gpio_chip, chip); - u32 mask; - - mask = __raw_readl(c->base); - mask &= ~(((1 << (offset + GPIO_OE_OFS)) | (1 << (offset + GPIO_OUT_OFS)))); - mask |= (1 << offset); - __raw_writel(mask, c->base); - - return 0; -} - -static void adm8668_gpio_set(struct gpio_chip *chip, - unsigned offset, int value) -{ - struct adm8668_gpio_chip *c = - container_of(chip, struct adm8668_gpio_chip, chip); - u32 mask; - - mask = __raw_readl(c->base); - if (value) - mask |= (1 << (offset + GPIO_OUT_OFS)); - else - mask &= ~(1 << (offset + GPIO_OUT_OFS)); - __raw_writel(mask, c->base); -} - -static int adm8668_gpio_get(struct gpio_chip *chip, - unsigned offset) -{ - struct adm8668_gpio_chip *c = - container_of(chip, struct adm8668_gpio_chip, chip); - u32 value; - - value = __raw_readl(c->base) & GPIO_MASK; - - return value & (1 << offset); -} - -static struct adm8668_gpio_chip adm8668_gpio_cpu = { - .base = (void __iomem *)KSEG1ADDR(ADM8668_CONFIG_BASE + CRGPIO_REG), - .chip = { - .label = "adm8668-cpu-gpio", - .direction_output = adm8668_gpio_dir_out, - .direction_input = adm8668_gpio_dir_in, - .set = adm8668_gpio_set, - .get = adm8668_gpio_get, - .ngpio = 6, - }, -}; - -static struct adm8668_gpio_chip adm8668_gpio_wlan = { - .base = (void __iomem *)KSEG1ADDR(ADM8668_WLAN_BASE + GPIO_REG), - .chip = { - .label = "adm8668-wlan-gpio", - .direction_output = adm8668_gpio_dir_out, - .direction_input = adm8668_gpio_dir_in, - .set = adm8668_gpio_set, - .get = adm8668_gpio_get, - .ngpio = 6, - .base = 6, - }, -}; - -static int __init adm8668_gpio_init(void) -{ - int ret; - - ret = gpiochip_add(&adm8668_gpio_cpu.chip); - if (ret) - return ret; - - return gpiochip_add(&adm8668_gpio_wlan.chip); -} -arch_initcall(adm8668_gpio_init); diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/irq.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/irq.c deleted file mode 100644 index 9d3b2b9b83..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/irq.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2010 Scott Nicholas <neutronscott@scottn.us> - * Copyright (C) 2012 Florian Fainelli <florian@openwrt.org> - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include <linux/init.h> -#include <linux/kernel_stat.h> -#include <linux/signal.h> -#include <linux/sched.h> -#include <linux/interrupt.h> -#include <linux/slab.h> -#include <linux/random.h> -#include <linux/pm.h> -#include <linux/irq.h> -#include <asm/mipsregs.h> -#include <asm/irq_cpu.h> -#include <asm/irq.h> -#include <adm8668.h> - -/* interrupt controller */ -#define IRQ_STATUS_REG 0x00 /* Read */ -#define IRQ_ENABLE_REG 0x08 /* Read/Write */ -#define IRQ_DISABLE_REG 0x0C /* Write */ - -#define IRQ_MASK 0xffff - -static inline void intc_write_reg(u32 val, unsigned int reg) -{ - void __iomem *base = (void __iomem *)KSEG1ADDR(ADM8668_INTC_BASE); - - __raw_writel(val, base + reg); -} - -static inline u32 intc_read_reg(unsigned int reg) -{ - void __iomem *base = (void __iomem *)KSEG1ADDR(ADM8668_INTC_BASE); - - return __raw_readl(base + reg); -} - -static void adm8668_irq_cascade(void) -{ - int irq; - u32 intsrc; - - intsrc = intc_read_reg(IRQ_STATUS_REG) & IRQ_MASK; - if (intsrc) { - irq = fls(intsrc) - 1; - do_IRQ(irq); - } else - spurious_interrupt(); -} - -/* - * System irq dispatch - */ -void plat_irq_dispatch(void) -{ - unsigned int pending; - - pending = read_c0_cause() & read_c0_status() & ST0_IM; - - /* timer interrupt, that we renumbered */ - if (pending & STATUSF_IP7) - do_IRQ(MIPS_CPU_IRQ_BASE + 7); - else if (pending & STATUSF_IP2) - adm8668_irq_cascade(); - else - spurious_interrupt(); -} - -/* - * enable 8668 irq - */ -static void enable_adm8668_irq(struct irq_data *d) -{ - intc_write_reg((1 << d->irq), IRQ_ENABLE_REG); -} - - -static void ack_adm8668_irq(struct irq_data *d) -{ - intc_write_reg((1 << d->irq), IRQ_DISABLE_REG); -} - -/* - * system irq type - */ - -static struct irq_chip adm8668_irq_type = { - .name = "adm8668", - .irq_ack = ack_adm8668_irq, - .irq_mask = ack_adm8668_irq, - .irq_unmask = enable_adm8668_irq -}; - -/* - * irq init - */ -static void __init init_adm8668_irqs(void) -{ - int i; - - /* disable all interrupts for the moment */ - intc_write_reg(IRQ_MASK, IRQ_DISABLE_REG); - - for (i = 0; i <= ADM8668_IRQ_MAX; i++) - irq_set_chip_and_handler(i, &adm8668_irq_type, - handle_level_irq); - - /* hw0 is where our interrupts are uh.. interrupted at. */ - set_c0_status(IE_IRQ0); -} - -/* - * system init - */ -void __init arch_init_irq(void) -{ - mips_cpu_irq_init(); - init_adm8668_irqs(); -} diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/platform.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/platform.c deleted file mode 100644 index 9e40691f92..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/platform.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (C) 2010 Scott Nicholas <neutronscott@scottn.us> - * Copyright (C) 2012 Florian Fainelli <florian@openwrt.org> - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/platform_device.h> -#include <linux/platform_data/tulip.h> -#include <linux/usb/ehci_pdriver.h> -#include <linux/mtd/physmap.h> -#include <linux/pci.h> -#include <linux/slab.h> -#include <linux/ioport.h> -#include <linux/amba/bus.h> -#include <linux/amba/serial.h> - -#include <asm/reboot.h> -#include <asm/time.h> -#include <asm/addrspace.h> -#include <asm/bootinfo.h> -#include <asm/io.h> -#include <adm8668.h> - -#define ADM8868_UBOOT_ENV 0x20000 -#define ADM8868_UBOOT_WAN_MAC 0x5ac -#define ADM8868_UBOOT_LAN_MAC 0x404 - -static void adm8668_uart_set_mctrl(struct amba_device *dev, - void __iomem *base, - unsigned int mcrtl) -{ -} - -static struct amba_pl010_data adm8668_uart0_data = { - .set_mctrl = adm8668_uart_set_mctrl, -}; - -static struct amba_device adm8668_uart0_device = { - .dev = { - .init_name = "apb:uart0", - .platform_data = &adm8668_uart0_data, - }, - .res = { - .start = ADM8668_UART0_BASE, - .end = ADM8668_UART0_BASE + 0xF, - .flags = IORESOURCE_MEM, - }, - .irq = { - ADM8668_UART0_IRQ, - -1 - }, - .periphid = 0x0041010, -}; - -static struct resource eth0_resources[] = { - { - .start = ADM8668_LAN_BASE, - .end = ADM8668_LAN_BASE + 256, - .flags = IORESOURCE_MEM, - }, - { - .start = ADM8668_LAN_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct tulip_platform_data eth0_pdata = { - .chip_id = ADM8668, -}; - -static struct platform_device adm8668_eth0_device = { - .name = "tulip", - .id = 0, - .resource = eth0_resources, - .num_resources = ARRAY_SIZE(eth0_resources), - .dev.platform_data = ð0_pdata, -}; - -static struct resource eth1_resources[] = { - { - .start = ADM8668_WAN_BASE, - .end = ADM8668_WAN_BASE + 256, - .flags = IORESOURCE_MEM, - }, - { - .start = ADM8668_WAN_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct tulip_platform_data eth1_pdata = { - .chip_id = ADM8668, -}; - -static struct platform_device adm8668_eth1_device = { - .name = "tulip", - .id = 1, - .resource = eth1_resources, - .num_resources = ARRAY_SIZE(eth1_resources), - .dev.platform_data = ð1_pdata, -}; - -static struct resource usb_resources[] = { - { - .start = ADM8668_USB_BASE, - .end = ADM8668_USB_BASE + 0x1FFFFF, - .flags = IORESOURCE_MEM, - }, - { - .start = ADM8668_USB_IRQ, - .end = ADM8668_USB_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct usb_ehci_pdata usb_pdata = { - .caps_offset = 0x100, - .has_tt = 1, -}; - -static struct platform_device adm8668_usb_device = { - .name = "ehci-platform", - .id = -1, - .resource = usb_resources, - .num_resources = ARRAY_SIZE(usb_resources), - .dev.platform_data = &usb_pdata, -}; - -static struct platform_device *adm8668_devs[] = { - &adm8668_eth0_device, - &adm8668_eth1_device, - &adm8668_usb_device, -}; - -static void adm8668_fetch_mac(int unit) -{ - u8 *mac; - u32 offset; - struct tulip_platform_data *pdata; - - switch (unit) { - case -1: - case 0: - offset = ADM8868_UBOOT_LAN_MAC; - pdata = ð0_pdata; - break; - case 1: - offset = ADM8868_UBOOT_WAN_MAC; - pdata = ð1_pdata; - break; - default: - pr_err("unsupported ethernet unit: %d\n", unit); - return; - } - - mac = (u8 *)(KSEG1ADDR(ADM8668_SMEM1_BASE) + ADM8868_UBOOT_ENV + offset); - - memcpy(pdata->mac, mac, sizeof(pdata->mac)); -} - -static void adm8668_ehci_workaround(void) -{ - u32 chipid; - - chipid = ADM8668_CONFIG_REG(ADM8668_CR0); - ADM8668_CONFIG_REG(ADM8668_CR66) = 0x0C1600D9; - - if (chipid == 0x86880001) - return; - - ADM8668_CONFIG_REG(ADM8668_CR66) &= ~(3 << 20); - ADM8668_CONFIG_REG(ADM8668_CR66) |= (1 << 20); - pr_info("ADM8668: applied USB workaround\n"); -} - - -int __init adm8668_devs_register(void) -{ - int ret; - - ret = amba_device_register(&adm8668_uart0_device, &iomem_resource); - if (ret) - panic("failed to register AMBA UART"); - - adm8668_fetch_mac(0); - adm8668_fetch_mac(1); - adm8668_ehci_workaround(); - - return platform_add_devices(adm8668_devs, ARRAY_SIZE(adm8668_devs)); -} -arch_initcall(adm8668_devs_register); diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/prom.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/prom.c deleted file mode 100644 index 24b77f8b9d..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/prom.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Scott Nicholas <neutronscott@scottn.us> - * - * based on work of rb532 prom.c - * Copyright (C) 2003, Peter Sadik <peter.sadik@idt.com> - * Copyright (C) 2005-2006, P.Christeas <p_christ@hol.gr> - * Copyright (C) 2007, Gabor Juhos <juhosg@openwrt.org> - * Felix Fietkau <nbd@openwrt.org> - * Florian Fainelli <florian@openwrt.org> - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/types.h> -#include <linux/console.h> -#include <linux/string.h> -#include <linux/serial_core.h> -#include <asm/bootinfo.h> -#include <adm8668.h> -#include "u-boot.h" - -register volatile struct global_data *gd asm ("k0"); - -void __init prom_free_prom_memory(void) -{ - /* No prom memory to free */ -} - -static inline int match_tag(char *arg, const char *tag) -{ - return strncmp(arg, tag, strlen(tag)) == 0; -} - -static inline unsigned long tag2ul(char *arg, const char *tag) -{ - char *num; - - num = arg + strlen(tag); - return simple_strtoul(num, 0, 10); -} - -void __init prom_setup_cmdline(void) -{ - char *cp; - int prom_argc; - char **prom_argv; - int i; - - prom_argc = fw_arg0; - prom_argv = (char **)KSEG0ADDR(fw_arg1); - - cp = &(arcs_cmdline[0]); - for (i = 1; i < prom_argc; i++) { - prom_argv[i] = (char *)KSEG0ADDR(prom_argv[i]); - - /* default bootargs has "console=/dev/ttyS0" yet console won't - * show up at all if you include the '/dev/' nowadays ... */ - if (match_tag(prom_argv[i], "console=/dev/")) { - char *ptr = prom_argv[i] + strlen("console=/dev/"); - - strcpy(cp, "console="); - cp += strlen("console="); - strcpy(cp, ptr); - cp += strlen(ptr); - *cp++ = ' '; - continue; - } - strcpy(cp, prom_argv[i]); - cp += strlen(prom_argv[i]); - *cp++ = ' '; - } - if (prom_argc > 1) - --cp; /* trailing space */ - - *cp = '\0'; -} - -void __init prom_init(void) -{ - bd_t *bd = gd->bd; - int memsize; - - memsize = bd->bi_memsize; - printk("Board info:\n"); - printk(" RAM size: %d MB\n", (int)memsize/(1024*1024)); - printk(" NOR start: %#lx\n", bd->bi_flashstart); - printk(" NOR size: %#lx\n", bd->bi_flashsize); - - prom_setup_cmdline(); - add_memory_region(0, memsize, BOOT_MEM_RAM); -} diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/setup.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/setup.c deleted file mode 100644 index b33c483d24..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/setup.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <linux/init.h> -#include <linux/reboot.h> - -#include <asm/reboot.h> -#include <adm8668.h> - -static void adm8668_restart(char *cmd) -{ - int i; - - /* the real deal */ - for (i = 0; i < 1000; i++) - ; - ADM8668_CONFIG_REG(ADM8668_CR1) = 1; -} - -void __init plat_mem_setup(void) -{ - _machine_restart = adm8668_restart; -} - -const char *get_system_type(void) -{ - unsigned long chipid = ADM8668_CONFIG_REG(ADM8668_CR0); - int product, revision; - static char ret[32]; - - product = chipid >> 16; - revision = chipid & 0xffff; - - /* i getting fancy :\ */ - snprintf(ret, sizeof(ret), "ADM%xr%x", product, revision); - - return ret; -} - diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/time.c b/target/linux/adm8668/files-3.14/arch/mips/adm8668/time.c deleted file mode 100644 index 87bdd66965..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/time.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/clk.h> - -#include <asm/time.h> -#include <adm8668.h> - -void __init plat_time_init(void) -{ - struct clk *sys_clk; - - adm8668_init_clocks(); - - sys_clk = clk_get(NULL, "sys"); - if (IS_ERR(sys_clk)) - panic("unable to get system clock\n"); - - mips_hpt_frequency = clk_get_rate(sys_clk) / 2; -} - diff --git a/target/linux/adm8668/files-3.14/arch/mips/adm8668/u-boot.h b/target/linux/adm8668/files-3.14/arch/mips/adm8668/u-boot.h deleted file mode 100644 index d9d226889b..0000000000 --- a/target/linux/adm8668/files-3.14/arch/mips/adm8668/u-boot.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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 - */ - -#ifndef _U_BOOT_H_ -#define _U_BOOT_H_ 1 - -typedef struct bd_info { - int bi_baudrate; /* serial console baudrate */ - unsigned long bi_ip_addr; /* IP Address */ - unsigned char bi_enetaddr[6]; /* Ethernet adress */ - unsigned long bi_arch_number; /* unique id for this board */ - unsigned long bi_boot_params; /* where this board expects params */ - unsigned long bi_memstart; /* start of DRAM memory */ - unsigned long bi_memsize; /* size of DRAM memory in bytes */ - unsigned long bi_flashstart; /* start of FLASH memory */ - unsigned long bi_flashsize; /* size of FLASH memory */ - unsigned long bi_flashoffset; /* reserved area for startup monitor */ -} bd_t; - -struct global_data { - bd_t *bd; /* board data... */ - unsigned long flags; - unsigned long baudrate; - unsigned long have_console; /* serial_init() was called */ - unsigned long ram_size; /* RAM size */ - unsigned long reloc_off; /* Relocation Offset */ - unsigned long env_addr; /* Address of Environment struct */ - unsigned long env_valid; /* Checksum of Environment valid? */ - void **jt; /* jump table */ -}; - -#endif /* _U_BOOT_H_ */ |