| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: amlogic_machdep.c,v 1.11 2015/03/03 23:14:41 jmcneill Exp $ */ | | 1 | /* $NetBSD: amlogic_machdep.c,v 1.12 2015/03/03 23:20:04 jmcneill Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Machine dependent functions for kernel setup for TI OSK5912 board. | | 4 | * Machine dependent functions for kernel setup for TI OSK5912 board. |
5 | * Based on lubbock_machdep.c which in turn was based on iq80310_machhdep.c | | 5 | * Based on lubbock_machdep.c which in turn was based on iq80310_machhdep.c |
6 | * | | 6 | * |
7 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. | | 7 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. |
8 | * Written by Hiroyuki Bessho for Genetec Corporation. | | 8 | * Written by Hiroyuki Bessho for Genetec Corporation. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -115,27 +115,27 @@ | | | @@ -115,27 +115,27 @@ |
115 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | | 115 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
116 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 116 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
117 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, | | 117 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, |
118 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 118 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
119 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 119 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
120 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 120 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
121 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 121 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
122 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 122 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
123 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 123 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
124 | * SUCH DAMAGE. | | 124 | * SUCH DAMAGE. |
125 | */ | | 125 | */ |
126 | | | 126 | |
127 | #include <sys/cdefs.h> | | 127 | #include <sys/cdefs.h> |
128 | __KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.11 2015/03/03 23:14:41 jmcneill Exp $"); | | 128 | __KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.12 2015/03/03 23:20:04 jmcneill Exp $"); |
129 | | | 129 | |
130 | #include "opt_machdep.h" | | 130 | #include "opt_machdep.h" |
131 | #include "opt_ddb.h" | | 131 | #include "opt_ddb.h" |
132 | #include "opt_md.h" | | 132 | #include "opt_md.h" |
133 | #include "opt_amlogic.h" | | 133 | #include "opt_amlogic.h" |
134 | #include "opt_arm_debug.h" | | 134 | #include "opt_arm_debug.h" |
135 | #include "opt_multiprocessor.h" | | 135 | #include "opt_multiprocessor.h" |
136 | | | 136 | |
137 | #include "amlogic_com.h" | | 137 | #include "amlogic_com.h" |
138 | #include "arml2cc.h" | | 138 | #include "arml2cc.h" |
139 | #include "ether.h" | | 139 | #include "ether.h" |
140 | | | 140 | |
141 | #include <sys/param.h> | | 141 | #include <sys/param.h> |
| @@ -623,22 +623,15 @@ amlogic_mpinit(uint32_t mpinit_vec) | | | @@ -623,22 +623,15 @@ amlogic_mpinit(uint32_t mpinit_vec) |
623 | ctrl = bus_space_read_4(bst, cpuconf_bsh, AMLOGIC_CPUCONF_CTRL_REG); | | 623 | ctrl = bus_space_read_4(bst, cpuconf_bsh, AMLOGIC_CPUCONF_CTRL_REG); |
624 | for (cpu = 0; cpu < ncpus; cpu++) { | | 624 | for (cpu = 0; cpu < ncpus; cpu++) { |
625 | ctrl |= __BIT(cpu); | | 625 | ctrl |= __BIT(cpu); |
626 | } | | 626 | } |
627 | bus_space_write_4(bst, cpuconf_bsh, AMLOGIC_CPUCONF_CTRL_REG, ctrl); | | 627 | bus_space_write_4(bst, cpuconf_bsh, AMLOGIC_CPUCONF_CTRL_REG, ctrl); |
628 | | | 628 | |
629 | __asm __volatile("sev"); | | 629 | __asm __volatile("sev"); |
630 | | | 630 | |
631 | for (i = 0x10000000; i > 0; i--) { | | 631 | for (i = 0x10000000; i > 0; i--) { |
632 | __asm __volatile("dmb" ::: "memory"); | | 632 | __asm __volatile("dmb" ::: "memory"); |
633 | if (arm_cpu_hatched == hatched) | | 633 | if (arm_cpu_hatched == hatched) |
634 | break; | | 634 | break; |
635 | } | | 635 | } |
636 | | | | |
637 | if (i == 0) { | | | |
638 | const char *msg = "\nWARNING: Some APs failed to start\n"; | | | |
639 | const char *p = msg; | | | |
640 | while (*p) | | | |
641 | amlogic_putchar(*p++); | | | |
642 | } | | | |
643 | } | | 636 | } |
644 | #endif | | 637 | #endif |