Module Name: src Committed By: nonaka Date: Sat Dec 20 18:03:17 UTC 2014
Modified Files: src/sys/arch/powerpc/booke/dev: pq3etsec.c pq3gpio.c src/sys/arch/powerpc/booke/pci: pq3pci.c Log Message: Revert previous accidental commit. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/dev/pq3gpio.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/booke/pci/pq3pci.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/powerpc/booke/dev/pq3etsec.c diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.17 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.18 --- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.17 Sat Dec 20 17:55:08 2014 +++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Sat Dec 20 18:03:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3etsec.c,v 1.17 2014/12/20 17:55:08 nonaka Exp $ */ +/* $NetBSD: pq3etsec.c,v 1.18 2014/12/20 18:03:17 nonaka Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.17 2014/12/20 17:55:08 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.18 2014/12/20 18:03:17 nonaka Exp $"); #include <sys/param.h> #include <sys/cpu.h> @@ -330,11 +330,9 @@ pq3mdio_match(device_t parent, cfdata_t const uint16_t svr = (mfspr(SPR_SVR) & ~0x80000) >> 16; const bool p1025_p = (svr == (SVR_P1025v1 >> 16) || svr == (SVR_P1016v1 >> 16)); - const bool p1023_p = (svr == (SVR_P1023v1 >> 16) - || svr == (SVR_P1017v1 >> 16)); if (device_is_a(parent, "cpunode")) { - if ((!p1025_p && !p1023_p) + if (!p1025_p || !e500_cpunode_submatch(parent, cf, cf->cf_name, aux)) return 0; @@ -342,7 +340,7 @@ pq3mdio_match(device_t parent, cfdata_t } if (device_is_a(parent, "tsec")) { - if ((p1025_p || p1023_p) + if (p1025_p || !e500_cpunode_submatch(parent, cf, cf->cf_name, aux)) return 0; Index: src/sys/arch/powerpc/booke/dev/pq3gpio.c diff -u src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.9 src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.10 --- src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.9 Sat Dec 20 17:55:08 2014 +++ src/sys/arch/powerpc/booke/dev/pq3gpio.c Sat Dec 20 18:03:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3gpio.c,v 1.9 2014/12/20 17:55:08 nonaka Exp $ */ +/* $NetBSD: pq3gpio.c,v 1.10 2014/12/20 18:03:17 nonaka Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pq3gpio.c,v 1.9 2014/12/20 17:55:08 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3gpio.c,v 1.10 2014/12/20 18:03:17 nonaka Exp $"); #include <sys/param.h> #include <sys/cpu.h> @@ -161,7 +161,7 @@ pq3gpio_pin_ctl(void *v, int num, int ct } #endif -#if defined(MPC8536) || defined(P2020) || defined(P1023) +#if defined(MPC8536) || defined(P2020) /* * MPC8536 / P20x0 have controllable input/output pins */ @@ -379,43 +379,6 @@ pq3gpio_mpc8548_attach(device_t self, bu } #endif /* MPC8548 */ -#ifdef P1023 -static void -pq3gpio_p1023_attach(device_t self, bus_space_tag_t bst, - bus_space_handle_t bsh, u_int svr) -{ - static const uint32_t gpio2pmuxcr_map[][2] = { - { __BIT(8), PMUXCR_SDHC_CD }, - { __BIT(9), PMUXCR_SDHC_WP }, - /* - * These are really two bits but the low bit MBZ so we ignore - * it. - */ - { __BIT(10), PMUXCR_TSEC3_TS }, - { __BIT(11), PMUXCR_TSEC3_TS }, - }; - - uint32_t pinmask = 0xffff0000; /* assume all bits are valid */ - size_t pincnt = 16; - const uint32_t pmuxcr = cpu_read_4(GLOBAL_BASE + PMUXCR); - for (size_t i = 0; i < __arraycount(gpio2pmuxcr_map); i++) { - if (pmuxcr & gpio2pmuxcr_map[i][1]) { - pinmask &= ~gpio2pmuxcr_map[i][0]; - pincnt--; - } - } - - /* - * Create GPIO pin groups - */ - aprint_normal_dev(self, "%zu input/output/opendrain pins\n", - pincnt); - pq3gpio_group_create(self, bst, bsh, GPDAT, pinmask, - GPIO_PIN_INPUT|GPIO_PIN_OUTPUT|GPIO_PIN_OPENDRAIN, - pq3gpio_pin_ctl); -} -#endif /* P1023 */ - #ifdef P1025 static void pq3gpio_p1025_attach(device_t self, bus_space_tag_t bst, @@ -524,10 +487,6 @@ static const struct pq3gpio_svr_info { { SVR_MPC8536v1 >> 16, pq3gpio_mpc8536_attach, GPIO_BASE, GPIO_SIZE }, #endif -#ifdef P1023 - { SVR_P1023v1 >> 16, pq3gpio_p1023_attach, - GPIO_BASE, GPIO_SIZE }, -#endif #ifdef P1025 { SVR_P1025v1 >> 16, pq3gpio_p1025_attach, GLOBAL_BASE, GLOBAL_SIZE }, Index: src/sys/arch/powerpc/booke/pci/pq3pci.c diff -u src/sys/arch/powerpc/booke/pci/pq3pci.c:1.18 src/sys/arch/powerpc/booke/pci/pq3pci.c:1.19 --- src/sys/arch/powerpc/booke/pci/pq3pci.c:1.18 Sat Dec 20 17:55:08 2014 +++ src/sys/arch/powerpc/booke/pci/pq3pci.c Sat Dec 20 18:03:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3pci.c,v 1.18 2014/12/20 17:55:08 nonaka Exp $ */ +/* $NetBSD: pq3pci.c,v 1.19 2014/12/20 18:03:17 nonaka Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -44,7 +44,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pq3pci.c,v 1.18 2014/12/20 17:55:08 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3pci.c,v 1.19 2014/12/20 18:03:17 nonaka Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -92,11 +92,6 @@ __KERNEL_RCSID(0, "$NetBSD: pq3pci.c,v 1 __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result), \ TRUTH_ENCODE(SVR_P1016v1, inst, PORDEVSR_##field, \ __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result) -#define PORDEVSR_P1023_TRUTH_ENCODE(inst, field, value, result) \ - TRUTH_ENCODE(SVR_P1023v1, inst, PORDEVSR_##field, \ - __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result), \ - TRUTH_ENCODE(SVR_P1017v1, inst, PORDEVSR_##field, \ - __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result) #define PORDEVSR_TRUTH_ENCODE(svr, inst, field, value, result) \ TRUTH_ENCODE(svr, inst, PORDEVSR_##field, \ @@ -176,22 +171,6 @@ const struct e500_truthtab pq3pci_pcie_l PORDEVSR_P1025_TRUTH_ENCODE(2, IOSEL, PCIE12_X1_SGMII23, 1), #endif - -#ifdef P1023 /* XXX XXXNONAKA FIXME */ - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE1_X1, 1), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE12_X1_3_X2, 1), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE13_X2, 2), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE1_X4, 4), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE1_X1_SRIO2500_1X, 1), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE12_X1_SGMII23, 1), - PORDEVSR_P1023_TRUTH_ENCODE(1, IOSEL, PCIE1_X2_SGMII23, 2), - - PORDEVSR_P1023_TRUTH_ENCODE(2, IOSEL, PCIE12_X1_3_X2, 1), - PORDEVSR_P1023_TRUTH_ENCODE(2, IOSEL, PCIE12_X1_SGMII23, 1), - - PORDEVSR_P1023_TRUTH_ENCODE(3, IOSEL, PCIE12_X1_3_X2, 2), - PORDEVSR_P1023_TRUTH_ENCODE(3, IOSEL, PCIE13_X2, 2), -#endif }; static const struct e500_truthtab pq3pci_pci_pcix[] = {