]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sbc8548: allow enabling PCI via a make config option
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 21 Sep 2009 00:36:06 +0000 (20:36 -0400)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 24 Sep 2009 17:05:00 +0000 (12:05 -0500)
Prior to this commit, to enable PCI, you had to go manually
edit the board config header, and if you had 33MHz PCI, you
had to manually change CONFIG_SYS_NS16550_CLK too, which was
not real user friendly,

This adds the typical PCI and clock speed make targets to the
toplevel Makefile in accordance with what is being done with
other boards (i.e. using the "-t" to mkconfig).

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
MAKEALL
Makefile
include/configs/sbc8548.h

diff --git a/MAKEALL b/MAKEALL
index 1d50c3430390d9b83f63571efad17fc9e3e53b6e..b394adbef78940a9d9894b331086af3101ac33f2 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -399,6 +399,10 @@ LIST_85xx="                \
        PM856           \
        sbc8540         \
        sbc8548         \
+       sbc8548_PCI_33  \
+       sbc8548_PCI_66  \
+       sbc8548_PCI_33_PCIE \
+       sbc8548_PCI_66_PCIE \
        sbc8560         \
        socrates        \
        stxgp3          \
index d8daa89502e14d24f2ee187d5284891018511cfb..55ee25d8ab16d17c993c4dbc00a7a726add4590a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2544,8 +2544,12 @@ sbc8540_66_config:       unconfig
        fi
        @$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560
 
-sbc8548_config:                unconfig
-       @$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548
+sbc8548_config \
+sbc8548_PCI_33_config \
+sbc8548_PCI_66_config \
+sbc8548_PCI_33_PCIE_config \
+sbc8548_PCI_66_PCIE_config: unconfig
+       @$(MKCONFIG) -t $(@:_config=) sbc8548 ppc mpc85xx sbc8548
 
 sbc8560_config \
 sbc8560_33_config \
index 1f340ed7fba60545d9d6b1262ce6a92dd4ffd733..d10792a22dab57d2d02843a0356e193234853050 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Wind River Systems <www.windriver.com>
+ * Copyright 2007,2009 Wind River Systems <www.windriver.com>
  * Copyright 2007 Embedded Specialties, Inc.
  * Copyright 2004, 2007 Freescale Semiconductor.
  *
 
 /*
  * sbc8548 board configuration file
- *
- * Please refer to doc/README.sbc85xx for more info.
- *
+ * Please refer to doc/README.sbc8548 for more info.
  */
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/* High Level Configuration Options */
+/*
+ * Top level Makefile configuration choices
+ */
+#ifdef CONFIG_MK_PCI
+#define CONFIG_PCI
+#define CONFIG_PCI1
+#endif
+
+#ifdef CONFIG_MK_66
+#define CONFIG_SYS_CLK_DIV 1
+#endif
+
+#ifdef CONFIG_MK_33
+#define CONFIG_SYS_CLK_DIV 2
+#endif
+
+#ifdef CONFIG_MK_PCIE
+#define CONFIG_PCIE1
+#endif
+
+/*
+ * High Level Configuration Options
+ */
 #define CONFIG_BOOKE           1       /* BOOKE */
 #define CONFIG_E500            1       /* BOOKE e500 family */
 #define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
 #define CONFIG_MPC8548         1       /* MPC8548 specific */
 #define CONFIG_SBC8548         1       /* SBC8548 board specific */
 
-#undef CONFIG_PCI              /* enable any pci type devices */
-#undef CONFIG_PCI1             /* PCI controller 1 */
-#undef CONFIG_PCIE1            /* PCIE controler 1 (slot 1) */
 #undef CONFIG_RIO
 
 #ifdef CONFIG_PCI
 
 #define CONFIG_FSL_LAW         1       /* Use common FSL init code */
 
-#define CONFIG_SYS_CLK_FREQ    66000000 /* SBC8548 default SYSCLK */
+/*
+ * Below assumes that CCB:SYSCLK remains unchanged at 6:1 via SW2:[1-4]
+ */
+#ifndef CONFIG_SYS_CLK_DIV
+#define CONFIG_SYS_CLK_DIV     1       /* 2, if 33MHz PCI card installed */
+#endif
+#define CONFIG_SYS_CLK_FREQ    (66000000 / CONFIG_SYS_CLK_DIV)
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    1
-#define CONFIG_SYS_NS16550_CLK         400000000 /* get_bus_freq(0) */
+#define CONFIG_SYS_NS16550_CLK         (400000000 / CONFIG_SYS_CLK_DIV)
 
 #define CONFIG_SYS_BAUDRATE_TABLE \
        {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}