]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-usb
authorTom Rini <trini@ti.com>
Sun, 26 Oct 2014 18:12:18 +0000 (14:12 -0400)
committerTom Rini <trini@ti.com>
Sun, 26 Oct 2014 18:12:18 +0000 (14:12 -0400)
1  2 
README
board/raspberrypi/rpi_b/rpi_b.c
include/configs/rpi_b.h

diff --combined README
index 3ff793266b87523c4fd22237760aadeef918a30c,d9a64ea62e22287a70a09fa0c6a00d08b5220c2f..2808dd1eb9a27cdacadb86f1a2dd9eb26121ec29
--- 1/README
--- 2/README
+++ b/README
@@@ -623,6 -623,13 +623,6 @@@ The following options need to be config
                exists, unlike the similar options in the Linux kernel. Do not
                set these options unless they apply!
  
 -- CPU timer options:
 -              CONFIG_SYS_HZ
 -
 -              The frequency of the timer returned by get_timer().
 -              get_timer() must operate in milliseconds and this CONFIG
 -              option must be set to 1000.
 -
  - Linux Kernel Interface:
                CONFIG_CLOCKS_IN_MHZ
  
                CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the
                txfilltuning field in the EHCI controller on reset.
  
+               CONFIG_USB_DWC2_REG_ADDR the physical CPU address of the DWC2
+               HW module registers.
  - USB Device:
                Define the below if you wish to use the USB console.
                Once firmware is rebuilt from a serial console issue the
@@@ -2715,14 -2725,6 +2718,14 @@@ CBFS (Coreboot Filesystem) suppor
                200 ms.
  
  - Configuration Management:
 +              CONFIG_BUILD_TARGET
 +
 +              Some SoCs need special image types (e.g. U-Boot binary
 +              with a special header) as build targets. By defining
 +              CONFIG_BUILD_TARGET in the SoC / board header, this
 +              special image will be automatically built upon calling
 +              make / MAKEALL.
 +
                CONFIG_IDENT_STRING
  
                If defined, this string will be added to the U-Boot
  
                Enable auto completion of commands using TAB.
  
 -              Note that this feature has NOT been implemented yet
 -              for the "hush" shell.
 -
 -
                CONFIG_SYS_HUSH_PARSER
  
                Define this variable to enable the "hush" shell (from
index 447c940f63154aa560881046a1d742b6bc1e7d5e,a92c1ec10f5b50201f3f80176378ae9da1b12dd0..7445f5318ad2ed44525ea8bf8a11cc5ae95cbc42
  
  #include <common.h>
  #include <config.h>
 +#include <dm.h>
  #include <fdt_support.h>
  #include <lcd.h>
  #include <mmc.h>
 +#include <asm/gpio.h>
  #include <asm/arch/mbox.h>
  #include <asm/arch/sdhci.h>
  #include <asm/global_data.h>
  
  DECLARE_GLOBAL_DATA_PTR;
  
 +static const struct bcm2835_gpio_platdata gpio_platdata = {
 +      .base = BCM2835_GPIO_BASE,
 +};
 +
 +U_BOOT_DEVICE(bcm2835_gpios) = {
 +      .name = "gpio_bcm2835",
 +      .platdata = &gpio_platdata,
 +};
 +
  struct msg_get_arm_mem {
        struct bcm2835_mbox_hdr hdr;
        struct bcm2835_mbox_tag_get_arm_mem get_arm_mem;
        u32 end_tag;
  };
  
+ struct msg_get_mac_address {
+       struct bcm2835_mbox_hdr hdr;
+       struct bcm2835_mbox_tag_get_mac_address get_mac_address;
+       u32 end_tag;
+ };
  struct msg_set_power_state {
        struct bcm2835_mbox_hdr hdr;
        struct bcm2835_mbox_tag_set_power_state set_power_state;
@@@ -73,6 -68,29 +79,29 @@@ int dram_init(void
        return 0;
  }
  
+ int misc_init_r(void)
+ {
+       ALLOC_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1, 16);
+       int ret;
+       if (getenv("usbethaddr"))
+               return 0;
+       BCM2835_MBOX_INIT_HDR(msg);
+       BCM2835_MBOX_INIT_TAG(&msg->get_mac_address, GET_MAC_ADDRESS);
+       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg->hdr);
+       if (ret) {
+               printf("bcm2835: Could not query MAC address\n");
+               /* Ignore error; not critical */
+               return 0;
+       }
+       eth_setenv_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac);
+       return 0;
+ }
  static int power_on_module(u32 module)
  {
        ALLOC_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1, 16);
diff --combined include/configs/rpi_b.h
index d9475e950b798188244e15269348c1a79ec5c687,6d01b61718a36d528e65794b00a9cde81773954a..ca27f9ad787008c507241464aadbbf191286a83f
   */
  #define CONFIG_MACH_TYPE              MACH_TYPE_BCM2708
  
 +/* Enable driver model */
 +#define CONFIG_DM
 +#define CONFIG_CMD_DM
 +#define CONFIG_DM_GPIO
 +
  /* Memory layout */
  #define CONFIG_NR_DRAM_BANKS          1
  #define CONFIG_SYS_SDRAM_BASE         0x00000000
  #define CONFIG_MMC_SDHCI_IO_ACCESSORS
  #define CONFIG_BCM2835_SDHCI
  
+ #define CONFIG_CMD_USB
+ #ifdef CONFIG_CMD_USB
+ #define CONFIG_USB_DWC2
+ #define CONFIG_USB_DWC2_REG_ADDR 0x20980000
+ #define CONFIG_USB_STORAGE
+ #define CONFIG_USB_HOST_ETHER
+ #define CONFIG_USB_ETHER_SMSC95XX
+ #define CONFIG_MISC_INIT_R
+ #endif
  /* Console UART */
  #define CONFIG_PL011_SERIAL
  #define CONFIG_PL011_CLOCK            3000000
  
  /* Some things don't make sense on this HW or yet */
  #undef CONFIG_CMD_FPGA
- #undef CONFIG_CMD_NET
- #undef CONFIG_CMD_NFS
  #undef CONFIG_CMD_SAVEENV
- #undef CONFIG_CMD_DHCP
- #undef CONFIG_CMD_MII
- #undef CONFIG_CMD_NET
- #undef CONFIG_CMD_PING
  
  /* Environment */
  #define ENV_DEVICE_SETTINGS \
        "ramdisk_addr_r=0x02100000\0" \
  
  #define BOOT_TARGET_DEVICES(func) \
-       func(MMC, mmc, 0)
+       func(MMC, mmc, 0) \
+       func(USB, usb, 0) \
+       func(PXE, pxe, na) \
+       func(DHCP, dhcp, na)
  #include <config_distro_bootcmd.h>
  
  #define CONFIG_EXTRA_ENV_SETTINGS \