Module Name: src Committed By: matt Date: Thu Feb 17 13:57:12 UTC 2011
Modified Files: src/sys/arch/evbppc/mpc85xx: autoconf.c machdep.c Log Message: Support a little bus_space for mapping the GUR registers since some devices use little endian registers. Add MPC8533 support. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/mpc85xx/autoconf.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/mpc85xx/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbppc/mpc85xx/autoconf.c diff -u src/sys/arch/evbppc/mpc85xx/autoconf.c:1.2 src/sys/arch/evbppc/mpc85xx/autoconf.c:1.3 --- src/sys/arch/evbppc/mpc85xx/autoconf.c:1.2 Tue Jan 18 01:10:25 2011 +++ src/sys/arch/evbppc/mpc85xx/autoconf.c Thu Feb 17 13:57:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2011/01/18 01:10:25 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2011/01/18 01:10:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $"); #define __INTR_PRIVATE @@ -121,6 +121,7 @@ ma.ma_name = "cpunode"; ma.ma_node = 0; ma.ma_memt = curcpu()->ci_softc->cpu_bst; + ma.ma_le_memt = curcpu()->ci_softc->cpu_le_bst; ma.ma_dmat = &booke_bus_dma_tag; config_found_sm_loc(self, "mainbus", NULL, &ma, mainbus_print, NULL); Index: src/sys/arch/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.4 src/sys/arch/evbppc/mpc85xx/machdep.c:1.5 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.4 Sun Feb 13 05:03:27 2011 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Thu Feb 17 13:57:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.4 2011/02/13 05:03:27 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.5 2011/02/17 13:57:12 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -128,6 +128,12 @@ .pbs_limit = GUR_SIZE, }; +struct powerpc_bus_space gur_le_bst = { + .pbs_flags = _BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_MEM_TYPE, + .pbs_offset = GUR_BASE, + .pbs_limit = GUR_SIZE, +}; + const bus_space_handle_t gur_bsh = (bus_space_handle_t)(uintptr_t)(GUR_BASE); #ifdef CADMUS @@ -522,6 +528,7 @@ { svr &= ~0x80000; /* clear security bit */ switch (svr >> 8) { + case SVR_MPC8533 >> 8: return "MPC8533"; case SVR_MPC8536v1 >> 8: return "MPC8536"; case SVR_MPC8541v1 >> 8: return "MPC8541"; case SVR_MPC8543v2 >> 8: return "MPC8543"; @@ -696,7 +703,9 @@ CTASSERT(offsetof(struct tlb_md_ops, md_tlb_mapiodev) == 0); cpu_md_ops.md_tlb_ops = (const void *)&early_tlb_mapiodev; bus_space_init(&gur_bst, NULL, NULL, 0); + bus_space_init(&gur_le_bst, NULL, NULL, 0); cpu->cpu_bst = &gur_bst; + cpu->cpu_le_bst = &gur_le_bst; cpu->cpu_bsh = gur_bsh; /* @@ -735,6 +744,7 @@ * Now find out how much memory is attached */ pmemsize = memprobe(endkernel); + cpu->cpu_highmem = pmemsize; printf(" memprobe=%zuMB", (size_t) (pmemsize >> 20)); /* @@ -1020,13 +1030,13 @@ switch (svr) { #if defined(MPC8536) case SVR_MPC8536v1 >> 16: - mpc85xx_pci_setup("pci1-interrupt-map", 0x001800, IST_LEVEL, + mpc85xx_pci_setup("pci0-interrupt-map", 0x001800, IST_LEVEL, 1, 2, 3, 4); break; #endif #if defined(MPC8544) case SVR_MPC8544v1 >> 16: - mpc85xx_pci_setup("pci1-interrupt-map", 0x001800, IST_LEVEL, + mpc85xx_pci_setup("pci0-interrupt-map", 0x001800, IST_LEVEL, 0, 1, 2, 3); break; #endif