setup.c (05668381140309088443bf5dc53add4104610fbb) | setup.c (36a885306fdf7bb557c773309c993bfb2d0d693c) |
---|---|
1/* 2 * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * --- 55 unchanged lines hidden (view full) --- 64 else if (part_type == K_SYS_PART_BCM1255) 65 soc_str = "BCM1255"; 66 else 67 soc_str = "BCM1x55"; 68 ret = setup_bcm1x80_bcm1x55(); 69 break; 70 71 default: | 1/* 2 * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * --- 55 unchanged lines hidden (view full) --- 64 else if (part_type == K_SYS_PART_BCM1255) 65 soc_str = "BCM1255"; 66 else 67 soc_str = "BCM1x55"; 68 ret = setup_bcm1x80_bcm1x55(); 69 break; 70 71 default: |
72 prom_printf("Unknown part type %x\n", part_type); | 72 printk("Unknown part type %x\n", part_type); |
73 ret = 1; 74 break; 75 } 76 return ret; 77} 78 79static inline int setup_bcm1x80_bcm1x55(void) 80{ --- 16 unchanged lines hidden (view full) --- 97 periph_rev = 1; 98 pass_str = "A3 (pass1)"; 99 break; 100 case K_SYS_REVISION_BCM1480_B0: 101 periph_rev = 1; 102 pass_str = "B0 (pass2)"; 103 break; 104 default: | 73 ret = 1; 74 break; 75 } 76 return ret; 77} 78 79static inline int setup_bcm1x80_bcm1x55(void) 80{ --- 16 unchanged lines hidden (view full) --- 97 periph_rev = 1; 98 pass_str = "A3 (pass1)"; 99 break; 100 case K_SYS_REVISION_BCM1480_B0: 101 periph_rev = 1; 102 pass_str = "B0 (pass2)"; 103 break; 104 default: |
105 prom_printf("Unknown %s rev %x\n", soc_str, soc_pass); | 105 printk("Unknown %s rev %x\n", soc_str, soc_pass); |
106 periph_rev = 1; 107 pass_str = "Unknown Revision"; 108 break; 109 } 110 return ret; 111} 112 113void bcm1480_setup(void) 114{ 115 uint64_t sys_rev; 116 int plldiv; 117 118 sb1_pass = read_c0_prid() & 0xff; 119 sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); 120 soc_type = SYS_SOC_TYPE(sys_rev); 121 part_type = G_SYS_PART(sys_rev); 122 soc_pass = G_SYS_REVISION(sys_rev); 123 124 if (sys_rev_decode()) { | 106 periph_rev = 1; 107 pass_str = "Unknown Revision"; 108 break; 109 } 110 return ret; 111} 112 113void bcm1480_setup(void) 114{ 115 uint64_t sys_rev; 116 int plldiv; 117 118 sb1_pass = read_c0_prid() & 0xff; 119 sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); 120 soc_type = SYS_SOC_TYPE(sys_rev); 121 part_type = G_SYS_PART(sys_rev); 122 soc_pass = G_SYS_REVISION(sys_rev); 123 124 if (sys_rev_decode()) { |
125 prom_printf("Restart after failure to identify SiByte chip\n"); | 125 printk("Restart after failure to identify SiByte chip\n"); |
126 machine_restart(NULL); 127 } 128 129 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); 130 zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25); 131 | 126 machine_restart(NULL); 127 } 128 129 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); 130 zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25); 131 |
132 prom_printf("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n", | 132 printk("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n", |
133 soc_str, pass_str, zbbus_mhz * 2, sb1_pass); | 133 soc_str, pass_str, zbbus_mhz * 2, sb1_pass); |
134 prom_printf("Board type: %s\n", get_system_type()); | 134 printk("Board type: %s\n", get_system_type()); |
135} | 135} |