X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fgdsys%2Fp1022%2Fcontrolcenterd.c;h=e960fa71acaa5dbc85b81b83aea346b8f46db24e;hb=09140113108541b95d340f3c7b6ee597d31ccc73;hp=f76d968962711a5612633b13a24b54d8ca826390;hpb=48b3ed217f58487c583d59575d7dfe2aafbb738d;p=oweals%2Fu-boot.git diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index f76d968962..e960fa71ac 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -23,6 +23,10 @@ #include #include +#include +#include +#include +#include #include #include #include @@ -32,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,8 +48,6 @@ #include "../common/dp501.h" #include "controlcenterd-id.h" -DECLARE_GLOBAL_DATA_PTR; - enum { HWVER_100 = 0, HWVER_110 = 1, @@ -57,6 +59,8 @@ struct ihs_fpga { u32 versions; /* 0x0004 */ u32 fpga_version; /* 0x0008 */ u32 fpga_features; /* 0x000c */ + u32 reserved[4]; /* 0x0010 */ + u32 control; /* 0x0020 */ }; #ifndef CONFIG_TRAILBLAZER @@ -219,9 +223,9 @@ void hw_watchdog_reset(void) } #ifdef CONFIG_TRAILBLAZER -int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - return run_command(getenv("bootcmd"), flag); + return run_command(env_get("bootcmd"), flag); } int board_early_init_r(void) @@ -326,23 +330,25 @@ int board_eth_init(bd_t *bis) } #ifdef CONFIG_OF_BOARD_SETUP -void ft_board_setup(void *blob, bd_t *bd) +int ft_board_setup(void *blob, bd_t *bd) { phys_addr_t base; phys_size_t size; ft_cpu_setup(blob, bd); - base = getenv_bootm_low(); - size = getenv_bootm_size(); + base = env_get_bootm_low(); + size = env_get_bootm_size(); fdt_fixup_memory(blob, (u64)base, (u64)size); #ifdef CONFIG_HAS_FSL_DR_USB - fdt_fixup_dr_usb(blob, bd); + fsl_fdt_fixup_dr_usb(blob, bd); #endif FT_FSL_PCI_SETUP; + + return 0; } #endif @@ -382,6 +388,9 @@ static void hydra_initialize(void) fpga = pci_map_bar(devno, PCI_BASE_ADDRESS_0, PCI_REGION_MEM); + /* disable sideband clocks */ + writel(1, &fpga->control); + versions = readl(&fpga->versions); fpga_version = readl(&fpga->fpga_version); fpga_features = readl(&fpga->fpga_features);