Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/cubie call pmap_devmap before awin_bootstrap.



details:   https://anonhg.NetBSD.org/src/rev/12abc01375f5
branches:  trunk
changeset: 789750:12abc01375f5
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Sep 07 00:31:10 2013 +0000

description:
call pmap_devmap before awin_bootstrap.
Don't copy bootargs yet.

diffstat:

 sys/arch/evbarm/cubie/cubie_machdep.c |  39 ++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 3 deletions(-)

diffs (89 lines):

diff -r 6f3d4d18373f -r 12abc01375f5 sys/arch/evbarm/cubie/cubie_machdep.c
--- a/sys/arch/evbarm/cubie/cubie_machdep.c     Sat Sep 07 00:30:17 2013 +0000
+++ b/sys/arch/evbarm/cubie/cubie_machdep.c     Sat Sep 07 00:31:10 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cubie_machdep.c,v 1.3 2013/09/04 17:45:40 matt Exp $ */
+/*     $NetBSD: cubie_machdep.c,v 1.4 2013/09/07 00:31:10 matt Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cubie_machdep.c,v 1.3 2013/09/04 17:45:40 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cubie_machdep.c,v 1.4 2013/09/07 00:31:10 matt Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -298,6 +298,7 @@
        psize_t ram_size = 0;
        char *ptr;
 
+       pmap_devmap_register(devmap);
        awin_bootstrap(AWIN_CORE_VBASE, CONADDR_VA);
 
        /* Heads up ... Setup the CPU / MMU / TLB functions. */
@@ -307,7 +308,6 @@
        init_clocks();
 
        /* The console is going to try to map things.  Give pmap a devmap. */
-       pmap_devmap_register(devmap);
        consinit();
 
        printf("\nuboot arg = %#x, %#x, %#x, %#x\n",
@@ -367,10 +367,14 @@
 #endif
        KASSERT((armreg_pfr1_read() & ARM_PFR1_SEC_MASK) != 0);
 
+#if 0
        /* "bootargs" env variable is passed as 4th argument to kernel */
+       printf("Copy bootargs");
        if (uboot_args[3] - AWIN_SDRAM_PBASE < ram_size) {
                strlcpy(bootargs, (char *)uboot_args[3], sizeof(bootargs));
        }
+       printf("\n");
+#endif
 
        arm32_bootmem_init(bootconfig.dram[0].address, ram_size,
            KERNEL_BASE_PHYS);
@@ -509,10 +513,39 @@
        }
 #endif
 
+       if (device_is_a(self, "awingpio")) {
+               /*
+                * These are GPIOs being used for various functions.
+                */
+               prop_dictionary_set_cstring(dict, "out-satapwren", "PB8");
+               prop_dictionary_set_cstring(dict, "out-usb0drv", "PB9");
+               prop_dictionary_set_cstring(dict, "out-usb1drv", "PH6");
+               prop_dictionary_set_cstring(dict, "out-usb2drv", "PH3");
+               prop_dictionary_set_cstring(dict, "out-hdd5ven", "PH17");
+               prop_dictionary_set_cstring(dict, "out-emacpwren", "PH19");
+               prop_dictionary_set_cstring(dict, "out-status-led1", "PH21");
+               prop_dictionary_set_cstring(dict, "out-status-led2", "PH20");
+
+               /*
+                * These pins have no connections.
+                */
+               prop_dictionary_set_uint32(dict, "nc-b", 0x0003d0e8);
+               prop_dictionary_set_uint32(dict, "nc-c", 0x00ff0000);
+               prop_dictionary_set_uint32(dict, "nc-h", 0x03c53f04);
+               prop_dictionary_set_uint32(dict, "nc-i", 0x003fc03f);
+               return;
+       }
+
        if (device_is_a(self, "ehci")) {
                return;
        }
 
+       if (device_is_a(self, "ahcisata")) {
+               /* PIO PB<8> output */
+               prop_dictionary_set_cstring(dict, "power-gpio", "satapwren");
+               return;
+       }
+
        if (device_is_a(self, "sdhc")) {
 #if 0
                prop_dictionary_set_uint32(dict, "clkmask", 0);



Home | Main Index | Thread Index | Old Index