diff options
Diffstat (limited to 'arch/arm/mach-integrator/integrator_ap.c')
| -rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index dd0cc677d596..660ca6feff40 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
| @@ -480,25 +480,18 @@ static const struct of_device_id ebi_match[] = { | |||
| 480 | static void __init ap_init_of(void) | 480 | static void __init ap_init_of(void) |
| 481 | { | 481 | { |
| 482 | unsigned long sc_dec; | 482 | unsigned long sc_dec; |
| 483 | struct device_node *root; | ||
| 484 | struct device_node *syscon; | 483 | struct device_node *syscon; |
| 485 | struct device_node *ebi; | 484 | struct device_node *ebi; |
| 486 | struct device *parent; | 485 | struct device *parent; |
| 487 | struct soc_device *soc_dev; | 486 | struct soc_device *soc_dev; |
| 488 | struct soc_device_attribute *soc_dev_attr; | 487 | struct soc_device_attribute *soc_dev_attr; |
| 489 | u32 ap_sc_id; | 488 | u32 ap_sc_id; |
| 490 | int err; | ||
| 491 | int i; | 489 | int i; |
| 492 | 490 | ||
| 493 | /* Here we create an SoC device for the root node */ | 491 | syscon = of_find_matching_node(NULL, ap_syscon_match); |
| 494 | root = of_find_node_by_path("/"); | ||
| 495 | if (!root) | ||
| 496 | return; | ||
| 497 | |||
| 498 | syscon = of_find_matching_node(root, ap_syscon_match); | ||
| 499 | if (!syscon) | 492 | if (!syscon) |
| 500 | return; | 493 | return; |
| 501 | ebi = of_find_matching_node(root, ebi_match); | 494 | ebi = of_find_matching_node(NULL, ebi_match); |
| 502 | if (!ebi) | 495 | if (!ebi) |
| 503 | return; | 496 | return; |
| 504 | 497 | ||
| @@ -509,19 +502,17 @@ static void __init ap_init_of(void) | |||
| 509 | if (!ebi_base) | 502 | if (!ebi_base) |
| 510 | return; | 503 | return; |
| 511 | 504 | ||
| 505 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 506 | ap_auxdata_lookup, NULL); | ||
| 507 | |||
| 512 | ap_sc_id = readl(ap_syscon_base); | 508 | ap_sc_id = readl(ap_syscon_base); |
| 513 | 509 | ||
| 514 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | 510 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); |
| 515 | if (!soc_dev_attr) | 511 | if (!soc_dev_attr) |
| 516 | return; | 512 | return; |
| 517 | 513 | ||
| 518 | err = of_property_read_string(root, "compatible", | 514 | soc_dev_attr->soc_id = "XVC"; |
| 519 | &soc_dev_attr->soc_id); | 515 | soc_dev_attr->machine = "Integrator/AP"; |
| 520 | if (err) | ||
| 521 | return; | ||
| 522 | err = of_property_read_string(root, "model", &soc_dev_attr->machine); | ||
| 523 | if (err) | ||
| 524 | return; | ||
| 525 | soc_dev_attr->family = "Integrator"; | 516 | soc_dev_attr->family = "Integrator"; |
| 526 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", | 517 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", |
| 527 | 'A' + (ap_sc_id & 0x0f)); | 518 | 'A' + (ap_sc_id & 0x0f)); |
| @@ -536,9 +527,6 @@ static void __init ap_init_of(void) | |||
| 536 | parent = soc_device_to_device(soc_dev); | 527 | parent = soc_device_to_device(soc_dev); |
| 537 | integrator_init_sysfs(parent, ap_sc_id); | 528 | integrator_init_sysfs(parent, ap_sc_id); |
| 538 | 529 | ||
| 539 | of_platform_populate(root, of_default_bus_match_table, | ||
| 540 | ap_auxdata_lookup, parent); | ||
| 541 | |||
| 542 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); | 530 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); |
| 543 | for (i = 0; i < 4; i++) { | 531 | for (i = 0; i < 4; i++) { |
| 544 | struct lm_device *lmdev; | 532 | struct lm_device *lmdev; |
