|
@@ -1617,3 +1617,83 @@ struct db_chip {
|
|
*/
|
|
*/
|
|
static struct db_chip db_chips[] __initdata = {
|
|
static struct db_chip db_chips[] __initdata = {
|
|
{
|
|
{
|
|
|
|
+ .chipid = 0xb800,
|
|
|
|
+ .name = "DB3000",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xc000,
|
|
|
|
+ .name = "DB3100",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xc800,
|
|
|
|
+ .name = "DB3150",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xd800,
|
|
|
|
+ .name = "DB3200",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xe000,
|
|
|
|
+ .name = "DB3250",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xe800,
|
|
|
|
+ .name = "DB3210",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xf000,
|
|
|
|
+ .name = "DB3350 P1x",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0xf100,
|
|
|
|
+ .name = "DB3350 P2x",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .chipid = 0x0000, /* List terminator */
|
|
|
|
+ .name = NULL,
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static void __init u300_init_check_chip(void)
|
|
|
|
+{
|
|
|
|
+
|
|
|
|
+ u16 val;
|
|
|
|
+ struct db_chip *chip;
|
|
|
|
+ const char *chipname;
|
|
|
|
+ const char unknown[] = "UNKNOWN";
|
|
|
|
+
|
|
|
|
+ /* Read out and print chip ID */
|
|
|
|
+ val = readw(U300_SYSCON_VBASE + U300_SYSCON_CIDR);
|
|
|
|
+ /* This is in funky bigendian order... */
|
|
|
|
+ val = (val & 0xFFU) << 8 | (val >> 8);
|
|
|
|
+ chip = db_chips;
|
|
|
|
+ chipname = unknown;
|
|
|
|
+
|
|
|
|
+ for ( ; chip->chipid; chip++) {
|
|
|
|
+ if (chip->chipid == (val & 0xFF00U)) {
|
|
|
|
+ chipname = chip->name;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ printk(KERN_INFO "Initializing U300 system on %s baseband chip " \
|
|
|
|
+ "(chip ID 0x%04x)\n", chipname, val);
|
|
|
|
+
|
|
|
|
+ if ((val & 0xFF00U) != 0xf000 && (val & 0xFF00U) != 0xf100) {
|
|
|
|
+ printk(KERN_ERR "Platform configured for BS335 " \
|
|
|
|
+ " with DB3350 but %s detected, expect problems!",
|
|
|
|
+ chipname);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Some devices and their resources require reserved physical memory from
|
|
|
|
+ * the end of the available RAM. This function traverses the list of devices
|
|
|
|
+ * and assigns actual addresses to these.
|
|
|
|
+ */
|
|
|
|
+static void __init u300_assign_physmem(void)
|
|
|
|
+{
|
|
|
|
+ unsigned long curr_start = __pa(high_memory);
|
|
|
|
+ int i, j;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < ARRAY_SIZE(platform_devs); i++) {
|
|
|
|
+ for (j = 0; j < platform_devs[i]->num_resources; j++) {
|