From 1a4596601fd395f3afb8f82f3f840c5e00bdd57a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 8 Jul 2013 09:37:19 +0200 Subject: Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini --- board/highbank/Makefile | 18 +----------------- board/highbank/highbank.c | 13 +------------ 2 files changed, 2 insertions(+), 29 deletions(-) (limited to 'board/highbank') diff --git a/board/highbank/Makefile b/board/highbank/Makefile index d5b836255c..3aa134ab49 100644 --- a/board/highbank/Makefile +++ b/board/highbank/Makefile @@ -2,23 +2,7 @@ # (C) Copyright 2000-2006 # 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 +# SPDX-License-Identifier: GPL-2.0+ # include $(TOPDIR)/config.mk diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 09cd45d374..8cdcea8aac 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -1,18 +1,7 @@ /* * Copyright 2010-2011 Calxeda, Inc. * - * 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 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, see . + * SPDX-License-Identifier: GPL-2.0+ */ #include -- cgit From 76c3999db439491a406cd6e7778300c992cda785 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 12 Jun 2013 22:24:52 -0500 Subject: ARM: highbank: setup peripherals based on power domain status Accessing powered down peripherals will hang the bus, so check power domain status before initializing SATA and fixup the FDT to disable unused peripherals. Signed-off-by: Rob Herring --- board/highbank/highbank.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'board/highbank') diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 09cd45d374..b224aae41b 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -23,13 +23,21 @@ #include #include +#define HB_AHCI_BASE 0xffe08000 + #define HB_SREG_A9_PWR_REQ 0xfff3cf00 #define HB_SREG_A9_BOOT_SRC_STAT 0xfff3cf04 +#define HB_SREG_A9_PWRDOM_STAT 0xfff3cf20 + #define HB_PWR_SUSPEND 0 #define HB_PWR_SOFT_RESET 1 #define HB_PWR_HARD_RESET 2 #define HB_PWR_SHUTDOWN 3 +#define PWRDOM_STAT_SATA 0x80000000 +#define PWRDOM_STAT_PCI 0x40000000 +#define PWRDOM_STAT_EMMC 0x20000000 + DECLARE_GLOBAL_DATA_PTR; /* @@ -58,9 +66,12 @@ int misc_init_r(void) { char envbuffer[16]; u32 boot_choice; + u32 reg = readl(HB_SREG_A9_PWRDOM_STAT); - ahci_init(0xffe08000); - scsi_scan(1); + if (reg & PWRDOM_STAT_SATA) { + ahci_init(HB_AHCI_BASE); + scsi_scan(1); + } boot_choice = readl(HB_SREG_A9_BOOT_SRC_STAT) & 0xff; sprintf(envbuffer, "bootcmd%d", boot_choice); @@ -85,6 +96,22 @@ void dram_init_banksize(void) gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; } +#if defined(CONFIG_OF_BOARD_SETUP) +void ft_board_setup(void *fdt, bd_t *bd) +{ + static const char disabled[] = "disabled"; + u32 reg = readl(HB_SREG_A9_PWRDOM_STAT); + + if (!(reg & PWRDOM_STAT_SATA)) + do_fixup_by_compat(fdt, "calxeda,hb-ahci", "status", + disabled, sizeof(disabled), 1); + + if (!(reg & PWRDOM_STAT_EMMC)) + do_fixup_by_compat(fdt, "calxeda,hb-sdhci", "status", + disabled, sizeof(disabled), 1); +} +#endif + void reset_cpu(ulong addr) { writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ); -- cgit From 953950234dfb555abdaaa7b8ce92779bbc9e269a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 12 Jun 2013 22:24:53 -0500 Subject: ARM: highbank: compile misc_init_r only if CONFIG_MISC_INIT_R Compile misc_init_r only if CONFIG_MISC_INIT_R is enabled. Signed-off-by: Rob Herring --- board/highbank/highbank.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board/highbank') diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index b224aae41b..b0c20fe56d 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -62,6 +62,7 @@ int board_eth_init(bd_t *bis) return rc; } +#ifdef CONFIG_MISC_INIT_R int misc_init_r(void) { char envbuffer[16]; @@ -83,6 +84,7 @@ int misc_init_r(void) return 0; } +#endif int dram_init(void) { -- cgit