Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'sh/hwblk' into sh-latest

+8 -494
-12
arch/sh/boards/mach-ap325rxa/setup.c
··· 249 249 .dev = { 250 250 .platform_data = &lcdc_info, 251 251 }, 252 - .archdata = { 253 - .hwblk_id = HWBLK_LCDC, 254 - }, 255 252 }; 256 253 257 254 static void camera_power(int val) ··· 421 424 .dev = { 422 425 .platform_data = &sh_mobile_ceu_info, 423 426 }, 424 - .archdata = { 425 - .hwblk_id = HWBLK_CEU, 426 - }, 427 427 }; 428 428 429 429 static struct resource sdhi0_cn3_resources[] = { ··· 448 454 .dev = { 449 455 .platform_data = &sdhi0_cn3_data, 450 456 }, 451 - .archdata = { 452 - .hwblk_id = HWBLK_SDHI0, 453 - }, 454 457 }; 455 458 456 459 static struct resource sdhi1_cn7_resources[] = { ··· 474 483 .resource = sdhi1_cn7_resources, 475 484 .dev = { 476 485 .platform_data = &sdhi1_cn7_data, 477 - }, 478 - .archdata = { 479 - .hwblk_id = HWBLK_SDHI1, 480 486 }, 481 487 }; 482 488
-36
arch/sh/boards/mach-ecovec24/setup.c
··· 156 156 }, 157 157 .num_resources = ARRAY_SIZE(sh_eth_resources), 158 158 .resource = sh_eth_resources, 159 - .archdata = { 160 - .hwblk_id = HWBLK_ETHER, 161 - }, 162 159 }; 163 160 164 161 /* USB0 host */ ··· 275 278 }, 276 279 .num_resources = ARRAY_SIZE(usbhs_resources), 277 280 .resource = usbhs_resources, 278 - .archdata = { 279 - .hwblk_id = HWBLK_USB1, 280 - }, 281 281 }; 282 282 283 283 /* LCDC */ ··· 360 366 .dev = { 361 367 .platform_data = &lcdc_info, 362 368 }, 363 - .archdata = { 364 - .hwblk_id = HWBLK_LCDC, 365 - }, 366 369 }; 367 370 368 371 /* CEU0 */ ··· 391 400 .dev = { 392 401 .platform_data = &sh_mobile_ceu0_info, 393 402 }, 394 - .archdata = { 395 - .hwblk_id = HWBLK_CEU0, 396 - }, 397 403 }; 398 404 399 405 /* CEU1 */ ··· 421 433 .resource = ceu1_resources, 422 434 .dev = { 423 435 .platform_data = &sh_mobile_ceu1_info, 424 - }, 425 - .archdata = { 426 - .hwblk_id = HWBLK_CEU1, 427 436 }, 428 437 }; 429 438 ··· 475 490 .resource = keysc_resources, 476 491 .dev = { 477 492 .platform_data = &keysc_info, 478 - }, 479 - .archdata = { 480 - .hwblk_id = HWBLK_KEYSC, 481 493 }, 482 494 }; 483 495 ··· 550 568 .dev = { 551 569 .platform_data = &sdhi0_info, 552 570 }, 553 - .archdata = { 554 - .hwblk_id = HWBLK_SDHI0, 555 - }, 556 571 }; 557 572 558 573 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) ··· 586 607 .id = 1, 587 608 .dev = { 588 609 .platform_data = &sdhi1_info, 589 - }, 590 - .archdata = { 591 - .hwblk_id = HWBLK_SDHI1, 592 610 }, 593 611 }; 594 612 #endif /* CONFIG_MMC_SH_MMCIF */ ··· 652 676 }, 653 677 .num_resources = ARRAY_SIZE(msiof0_resources), 654 678 .resource = msiof0_resources, 655 - .archdata = { 656 - .hwblk_id = HWBLK_MSIOF0, 657 - }, 658 679 }; 659 680 660 681 #endif ··· 791 818 .dev = { 792 819 .platform_data = &fsi_info, 793 820 }, 794 - .archdata = { 795 - .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ 796 - }, 797 821 }; 798 822 799 823 /* IrDA */ ··· 852 882 .dev = { 853 883 .platform_data = &sh_vou_pdata, 854 884 }, 855 - .archdata = { 856 - .hwblk_id = HWBLK_VOU, 857 - }, 858 885 }; 859 886 860 887 #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) ··· 903 936 }, 904 937 .num_resources = ARRAY_SIZE(sh_mmcif_resources), 905 938 .resource = sh_mmcif_resources, 906 - .archdata = { 907 - .hwblk_id = HWBLK_MMC, 908 - }, 909 939 }; 910 940 #endif 911 941
-12
arch/sh/boards/mach-kfr2r09/setup.c
··· 122 122 .dev = { 123 123 .platform_data = &kfr2r09_sh_keysc_info, 124 124 }, 125 - .archdata = { 126 - .hwblk_id = HWBLK_KEYSC, 127 - }, 128 125 }; 129 126 130 127 static const struct fb_videomode kfr2r09_lcdc_modes[] = { ··· 188 191 .dev = { 189 192 .platform_data = &kfr2r09_sh_lcdc_info, 190 193 }, 191 - .archdata = { 192 - .hwblk_id = HWBLK_LCDC, 193 - }, 194 194 }; 195 195 196 196 static struct r8a66597_platdata kfr2r09_usb0_gadget_data = { ··· 247 253 .resource = kfr2r09_ceu_resources, 248 254 .dev = { 249 255 .platform_data = &sh_mobile_ceu_info, 250 - }, 251 - .archdata = { 252 - .hwblk_id = HWBLK_CEU0, 253 256 }, 254 257 }; 255 258 ··· 367 376 .resource = kfr2r09_sh_sdhi0_resources, 368 377 .dev = { 369 378 .platform_data = &sh7724_sdhi0_data, 370 - }, 371 - .archdata = { 372 - .hwblk_id = HWBLK_SDHI0, 373 379 }, 374 380 }; 375 381
-12
arch/sh/boards/mach-migor/setup.c
··· 99 99 .dev = { 100 100 .platform_data = &sh_keysc_info, 101 101 }, 102 - .archdata = { 103 - .hwblk_id = HWBLK_KEYSC, 104 - }, 105 102 }; 106 103 107 104 static struct mtd_partition migor_nor_flash_partitions[] = ··· 297 300 .dev = { 298 301 .platform_data = &sh_mobile_lcdc_info, 299 302 }, 300 - .archdata = { 301 - .hwblk_id = HWBLK_LCDC, 302 - }, 303 303 }; 304 304 305 305 static struct clk *camera_clk; ··· 384 390 .dev = { 385 391 .platform_data = &sh_mobile_ceu_info, 386 392 }, 387 - .archdata = { 388 - .hwblk_id = HWBLK_CEU, 389 - }, 390 393 }; 391 394 392 395 static struct resource sdhi_cn9_resources[] = { ··· 411 420 .resource = sdhi_cn9_resources, 412 421 .dev = { 413 422 .platform_data = &sh7724_sdhi_data, 414 - }, 415 - .archdata = { 416 - .hwblk_id = HWBLK_SDHI, 417 423 }, 418 424 }; 419 425
-3
arch/sh/boards/mach-se/7722/setup.c
··· 127 127 .dev = { 128 128 .platform_data = &sh_keysc_info, 129 129 }, 130 - .archdata = { 131 - .hwblk_id = HWBLK_KEYSC, 132 - }, 133 130 }; 134 131 135 132 static struct platform_device *se7722_devices[] __initdata = {
-30
arch/sh/boards/mach-se/7724/setup.c
··· 210 210 .dev = { 211 211 .platform_data = &lcdc_info, 212 212 }, 213 - .archdata = { 214 - .hwblk_id = HWBLK_LCDC, 215 - }, 216 213 }; 217 214 218 215 /* CEU0 */ ··· 240 243 .resource = ceu0_resources, 241 244 .dev = { 242 245 .platform_data = &sh_mobile_ceu0_info, 243 - }, 244 - .archdata = { 245 - .hwblk_id = HWBLK_CEU0, 246 246 }, 247 247 }; 248 248 ··· 272 278 .dev = { 273 279 .platform_data = &sh_mobile_ceu1_info, 274 280 }, 275 - .archdata = { 276 - .hwblk_id = HWBLK_CEU1, 277 - }, 278 281 }; 279 282 280 283 /* FSI */ ··· 300 309 .resource = fsi_resources, 301 310 .dev = { 302 311 .platform_data = &fsi_info, 303 - }, 304 - .archdata = { 305 - .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ 306 312 }, 307 313 }; 308 314 ··· 343 355 .dev = { 344 356 .platform_data = &keysc_info, 345 357 }, 346 - .archdata = { 347 - .hwblk_id = HWBLK_KEYSC, 348 - }, 349 358 }; 350 359 351 360 /* SH Eth */ ··· 371 386 }, 372 387 .num_resources = ARRAY_SIZE(sh_eth_resources), 373 388 .resource = sh_eth_resources, 374 - .archdata = { 375 - .hwblk_id = HWBLK_ETHER, 376 - }, 377 389 }; 378 390 379 391 static struct r8a66597_platdata sh7724_usb0_host_data = { ··· 400 418 }, 401 419 .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), 402 420 .resource = sh7724_usb0_host_resources, 403 - .archdata = { 404 - .hwblk_id = HWBLK_USB0, 405 - }, 406 421 }; 407 422 408 423 static struct r8a66597_platdata sh7724_usb1_gadget_data = { ··· 458 479 .dev = { 459 480 .platform_data = &sh7724_sdhi0_data, 460 481 }, 461 - .archdata = { 462 - .hwblk_id = HWBLK_SDHI0, 463 - }, 464 482 }; 465 483 466 484 static struct resource sdhi1_cn8_resources[] = { ··· 486 510 .resource = sdhi1_cn8_resources, 487 511 .dev = { 488 512 .platform_data = &sh7724_sdhi1_data, 489 - }, 490 - .archdata = { 491 - .hwblk_id = HWBLK_SDHI1, 492 513 }, 493 514 }; 494 515 ··· 548 575 .resource = sh_vou_resources, 549 576 .dev = { 550 577 .platform_data = &sh_vou_pdata, 551 - }, 552 - .archdata = { 553 - .hwblk_id = HWBLK_VOU, 554 578 }, 555 579 }; 556 580
-1
arch/sh/include/asm/device.h
··· 15 15 void plat_early_device_setup(void); 16 16 17 17 struct pdev_archdata { 18 - int hwblk_id; 19 18 };
-75
arch/sh/include/asm/hwblk.h
··· 1 - #ifndef __ASM_SH_HWBLK_H 2 - #define __ASM_SH_HWBLK_H 3 - 4 - #include <asm/clock.h> 5 - #include <asm/io.h> 6 - 7 - #define HWBLK_CNT_USAGE 0 8 - #define HWBLK_CNT_IDLE 1 9 - #define HWBLK_CNT_DEVICES 2 10 - #define HWBLK_CNT_NR 3 11 - 12 - #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */ 13 - 14 - #define HWBLK_AREA(_flags, _parent) \ 15 - { \ 16 - .flags = _flags, \ 17 - .parent = _parent, \ 18 - } 19 - 20 - struct hwblk_area { 21 - int cnt[HWBLK_CNT_NR]; 22 - unsigned char parent; 23 - unsigned char flags; 24 - }; 25 - 26 - #define HWBLK(_mstp, _bit, _area) \ 27 - { \ 28 - .mstp = (void __iomem *)_mstp, \ 29 - .bit = _bit, \ 30 - .area = _area, \ 31 - } 32 - 33 - struct hwblk { 34 - void __iomem *mstp; 35 - unsigned char bit; 36 - unsigned char area; 37 - int cnt[HWBLK_CNT_NR]; 38 - }; 39 - 40 - struct hwblk_info { 41 - struct hwblk_area *areas; 42 - int nr_areas; 43 - struct hwblk *hwblks; 44 - int nr_hwblks; 45 - }; 46 - 47 - #if !defined(CONFIG_CPU_SUBTYPE_SH7722) && \ 48 - !defined(CONFIG_CPU_SUBTYPE_SH7723) && \ 49 - !defined(CONFIG_CPU_SUBTYPE_SH7724) 50 - /* Should be defined by processor-specific code */ 51 - int arch_hwblk_init(void); 52 - int arch_hwblk_sleep_mode(void); 53 - 54 - int hwblk_register(struct hwblk_info *info); 55 - int hwblk_init(void); 56 - 57 - void hwblk_enable(struct hwblk_info *info, int hwblk); 58 - void hwblk_disable(struct hwblk_info *info, int hwblk); 59 - 60 - void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt); 61 - void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt); 62 - 63 - /* allow clocks to enable and disable hardware blocks */ 64 - #define SH_HWBLK_CLK(_hwblk, _parent, _flags) \ 65 - [_hwblk] = { \ 66 - .parent = _parent, \ 67 - .arch_flags = _hwblk, \ 68 - .flags = _flags, \ 69 - } 70 - 71 - int sh_hwblk_clk_register(struct clk *clks, int nr); 72 - #else 73 - #define hwblk_init() 0 74 - #endif 75 - #endif /* __ASM_SH_HWBLK_H */
+5 -8
arch/sh/include/cpu-sh4/cpu/sh7722.h
··· 222 222 }; 223 223 224 224 enum { 225 - HWBLK_UNKNOWN = 0, 226 - HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_URAM, HWBLK_XYMEM, 227 - HWBLK_INTC, HWBLK_DMAC, HWBLK_SHYWAY, HWBLK_HUDI, 228 - HWBLK_UBC, HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL, 229 - HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SIO, 230 - HWBLK_SIOF0, HWBLK_SIOF1, HWBLK_IIC, HWBLK_RTC, 231 - HWBLK_TPU, HWBLK_IRDA, HWBLK_SDHI, HWBLK_SIM, HWBLK_KEYSC, 232 - HWBLK_TSIF, HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU, 225 + HWBLK_URAM, HWBLK_XYMEM, 226 + HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL, 227 + HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_IIC, HWBLK_RTC, 228 + HWBLK_SDHI, HWBLK_KEYSC, 229 + HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU, 233 230 HWBLK_JPU, HWBLK_BEU, HWBLK_CEU, HWBLK_VEU, HWBLK_VPU, 234 231 HWBLK_LCDC, 235 232 HWBLK_NR,
+1 -2
arch/sh/include/cpu-sh4/cpu/sh7723.h
··· 266 266 }; 267 267 268 268 enum { 269 - HWBLK_UNKNOWN = 0, 270 269 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_L2C, HWBLK_ILMEM, HWBLK_FPU, 271 270 HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY, 272 - HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC, HWBLK_SUBC, 271 + HWBLK_HUDI, HWBLK_UBC, 273 272 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1, 274 273 HWBLK_FLCTL, 275 274 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2,
+1 -2
arch/sh/include/cpu-sh4/cpu/sh7724.h
··· 268 268 }; 269 269 270 270 enum { 271 - HWBLK_UNKNOWN = 0, 272 271 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_RSMEM, HWBLK_ILMEM, HWBLK_L2C, 273 272 HWBLK_FPU, HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY, 274 - HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC, 273 + HWBLK_HUDI, HWBLK_UBC, 275 274 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1, 276 275 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SCIF3, 277 276 HWBLK_SCIF4, HWBLK_SCIF5, HWBLK_MSIOF0, HWBLK_MSIOF1,
-3
arch/sh/kernel/cpu/Makefile
··· 19 19 obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o 20 20 21 21 obj-y += irq/ init.o clock.o fpu.o proc.o 22 - ifneq ($(CONFIG_CPU_SUBTYPE_SH7722)$(CONFIG_CPU_SUBTYPE_SH7723)$(CONFIG_CPU_SUBTYPE_SH7724),y) 23 - obj-y += hwblk.o 24 - endif
-159
arch/sh/kernel/cpu/hwblk.c
··· 1 - #include <linux/clk.h> 2 - #include <linux/compiler.h> 3 - #include <linux/io.h> 4 - #include <linux/spinlock.h> 5 - #include <asm/suspend.h> 6 - #include <asm/hwblk.h> 7 - #include <asm/clock.h> 8 - 9 - static DEFINE_SPINLOCK(hwblk_lock); 10 - 11 - static void hwblk_area_mod_cnt(struct hwblk_info *info, 12 - int area, int counter, int value, int goal) 13 - { 14 - struct hwblk_area *hap = info->areas + area; 15 - 16 - hap->cnt[counter] += value; 17 - 18 - if (hap->cnt[counter] != goal) 19 - return; 20 - 21 - if (hap->flags & HWBLK_AREA_FLAG_PARENT) 22 - hwblk_area_mod_cnt(info, hap->parent, counter, value, goal); 23 - } 24 - 25 - 26 - static int __hwblk_mod_cnt(struct hwblk_info *info, int hwblk, 27 - int counter, int value, int goal) 28 - { 29 - struct hwblk *hp = info->hwblks + hwblk; 30 - 31 - hp->cnt[counter] += value; 32 - if (hp->cnt[counter] == goal) 33 - hwblk_area_mod_cnt(info, hp->area, counter, value, goal); 34 - 35 - return hp->cnt[counter]; 36 - } 37 - 38 - static void hwblk_mod_cnt(struct hwblk_info *info, int hwblk, 39 - int counter, int value, int goal) 40 - { 41 - unsigned long flags; 42 - 43 - spin_lock_irqsave(&hwblk_lock, flags); 44 - __hwblk_mod_cnt(info, hwblk, counter, value, goal); 45 - spin_unlock_irqrestore(&hwblk_lock, flags); 46 - } 47 - 48 - void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int counter) 49 - { 50 - hwblk_mod_cnt(info, hwblk, counter, 1, 1); 51 - } 52 - 53 - void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int counter) 54 - { 55 - hwblk_mod_cnt(info, hwblk, counter, -1, 0); 56 - } 57 - 58 - void hwblk_enable(struct hwblk_info *info, int hwblk) 59 - { 60 - struct hwblk *hp = info->hwblks + hwblk; 61 - unsigned long tmp; 62 - unsigned long flags; 63 - int ret; 64 - 65 - spin_lock_irqsave(&hwblk_lock, flags); 66 - 67 - ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, 1, 1); 68 - if (ret == 1) { 69 - tmp = __raw_readl(hp->mstp); 70 - tmp &= ~(1 << hp->bit); 71 - __raw_writel(tmp, hp->mstp); 72 - } 73 - 74 - spin_unlock_irqrestore(&hwblk_lock, flags); 75 - } 76 - 77 - void hwblk_disable(struct hwblk_info *info, int hwblk) 78 - { 79 - struct hwblk *hp = info->hwblks + hwblk; 80 - unsigned long tmp; 81 - unsigned long flags; 82 - int ret; 83 - 84 - spin_lock_irqsave(&hwblk_lock, flags); 85 - 86 - ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, -1, 0); 87 - if (ret == 0) { 88 - tmp = __raw_readl(hp->mstp); 89 - tmp |= 1 << hp->bit; 90 - __raw_writel(tmp, hp->mstp); 91 - } 92 - 93 - spin_unlock_irqrestore(&hwblk_lock, flags); 94 - } 95 - 96 - struct hwblk_info *hwblk_info; 97 - 98 - int __init hwblk_register(struct hwblk_info *info) 99 - { 100 - hwblk_info = info; 101 - return 0; 102 - } 103 - 104 - int __init __weak arch_hwblk_init(void) 105 - { 106 - return 0; 107 - } 108 - 109 - int __weak arch_hwblk_sleep_mode(void) 110 - { 111 - return SUSP_SH_SLEEP; 112 - } 113 - 114 - int __init hwblk_init(void) 115 - { 116 - return arch_hwblk_init(); 117 - } 118 - 119 - /* allow clocks to enable and disable hardware blocks */ 120 - static int sh_hwblk_clk_enable(struct clk *clk) 121 - { 122 - if (!hwblk_info) 123 - return -ENOENT; 124 - 125 - hwblk_enable(hwblk_info, clk->arch_flags); 126 - return 0; 127 - } 128 - 129 - static void sh_hwblk_clk_disable(struct clk *clk) 130 - { 131 - if (hwblk_info) 132 - hwblk_disable(hwblk_info, clk->arch_flags); 133 - } 134 - 135 - static struct clk_ops sh_hwblk_clk_ops = { 136 - .enable = sh_hwblk_clk_enable, 137 - .disable = sh_hwblk_clk_disable, 138 - .recalc = followparent_recalc, 139 - }; 140 - 141 - int __init sh_hwblk_clk_register(struct clk *clks, int nr) 142 - { 143 - struct clk *clkp; 144 - int ret = 0; 145 - int k; 146 - 147 - for (k = 0; !ret && (k < nr); k++) { 148 - clkp = clks + k; 149 - 150 - /* skip over clocks using hwblk 0 (HWBLK_UNKNOWN) */ 151 - if (!clkp->arch_flags) 152 - continue; 153 - 154 - clkp->ops = &sh_hwblk_clk_ops; 155 - ret |= clk_register(clkp); 156 - } 157 - 158 - return ret; 159 - }
-36
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
··· 173 173 .dev = { 174 174 .platform_data = &dma_platform_data, 175 175 }, 176 - .archdata = { 177 - .hwblk_id = HWBLK_DMAC, 178 - }, 179 176 }; 180 177 181 178 /* Serial */ ··· 261 264 .id = -1, 262 265 .num_resources = ARRAY_SIZE(rtc_resources), 263 266 .resource = rtc_resources, 264 - .archdata = { 265 - .hwblk_id = HWBLK_RTC, 266 - }, 267 267 }; 268 268 269 269 static struct m66592_platdata usbf_platdata = { ··· 291 297 }, 292 298 .num_resources = ARRAY_SIZE(usbf_resources), 293 299 .resource = usbf_resources, 294 - .archdata = { 295 - .hwblk_id = HWBLK_USBF, 296 - }, 297 300 }; 298 301 299 302 static struct resource iic_resources[] = { ··· 312 321 .id = 0, /* "i2c0" clock */ 313 322 .num_resources = ARRAY_SIZE(iic_resources), 314 323 .resource = iic_resources, 315 - .archdata = { 316 - .hwblk_id = HWBLK_IIC, 317 - }, 318 324 }; 319 325 320 326 static struct uio_info vpu_platform_data = { ··· 340 352 }, 341 353 .resource = vpu_resources, 342 354 .num_resources = ARRAY_SIZE(vpu_resources), 343 - .archdata = { 344 - .hwblk_id = HWBLK_VPU, 345 - }, 346 355 }; 347 356 348 357 static struct uio_info veu_platform_data = { ··· 368 383 }, 369 384 .resource = veu_resources, 370 385 .num_resources = ARRAY_SIZE(veu_resources), 371 - .archdata = { 372 - .hwblk_id = HWBLK_VEU, 373 - }, 374 386 }; 375 387 376 388 static struct uio_info jpu_platform_data = { ··· 396 414 }, 397 415 .resource = jpu_resources, 398 416 .num_resources = ARRAY_SIZE(jpu_resources), 399 - .archdata = { 400 - .hwblk_id = HWBLK_JPU, 401 - }, 402 417 }; 403 418 404 419 static struct sh_timer_config cmt_platform_data = { ··· 425 446 }, 426 447 .resource = cmt_resources, 427 448 .num_resources = ARRAY_SIZE(cmt_resources), 428 - .archdata = { 429 - .hwblk_id = HWBLK_CMT, 430 - }, 431 449 }; 432 450 433 451 static struct sh_timer_config tmu0_platform_data = { ··· 453 477 }, 454 478 .resource = tmu0_resources, 455 479 .num_resources = ARRAY_SIZE(tmu0_resources), 456 - .archdata = { 457 - .hwblk_id = HWBLK_TMU, 458 - }, 459 480 }; 460 481 461 482 static struct sh_timer_config tmu1_platform_data = { ··· 481 508 }, 482 509 .resource = tmu1_resources, 483 510 .num_resources = ARRAY_SIZE(tmu1_resources), 484 - .archdata = { 485 - .hwblk_id = HWBLK_TMU, 486 - }, 487 511 }; 488 512 489 513 static struct sh_timer_config tmu2_platform_data = { ··· 508 538 }, 509 539 .resource = tmu2_resources, 510 540 .num_resources = ARRAY_SIZE(tmu2_resources), 511 - .archdata = { 512 - .hwblk_id = HWBLK_TMU, 513 - }, 514 541 }; 515 542 516 543 static struct siu_platform siu_platform_data = { ··· 538 571 }, 539 572 .resource = siu_resources, 540 573 .num_resources = ARRAY_SIZE(siu_resources), 541 - .archdata = { 542 - .hwblk_id = HWBLK_SIU, 543 - }, 544 574 }; 545 575 546 576 static struct platform_device *sh7722_devices[] __initdata = {
-39
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
··· 158 158 }, 159 159 .resource = vpu_resources, 160 160 .num_resources = ARRAY_SIZE(vpu_resources), 161 - .archdata = { 162 - .hwblk_id = HWBLK_VPU, 163 - }, 164 161 }; 165 162 166 163 static struct uio_info veu0_platform_data = { ··· 186 189 }, 187 190 .resource = veu0_resources, 188 191 .num_resources = ARRAY_SIZE(veu0_resources), 189 - .archdata = { 190 - .hwblk_id = HWBLK_VEU2H0, 191 - }, 192 192 }; 193 193 194 194 static struct uio_info veu1_platform_data = { ··· 214 220 }, 215 221 .resource = veu1_resources, 216 222 .num_resources = ARRAY_SIZE(veu1_resources), 217 - .archdata = { 218 - .hwblk_id = HWBLK_VEU2H1, 219 - }, 220 223 }; 221 224 222 225 static struct sh_timer_config cmt_platform_data = { ··· 243 252 }, 244 253 .resource = cmt_resources, 245 254 .num_resources = ARRAY_SIZE(cmt_resources), 246 - .archdata = { 247 - .hwblk_id = HWBLK_CMT, 248 - }, 249 255 }; 250 256 251 257 static struct sh_timer_config tmu0_platform_data = { ··· 271 283 }, 272 284 .resource = tmu0_resources, 273 285 .num_resources = ARRAY_SIZE(tmu0_resources), 274 - .archdata = { 275 - .hwblk_id = HWBLK_TMU0, 276 - }, 277 286 }; 278 287 279 288 static struct sh_timer_config tmu1_platform_data = { ··· 299 314 }, 300 315 .resource = tmu1_resources, 301 316 .num_resources = ARRAY_SIZE(tmu1_resources), 302 - .archdata = { 303 - .hwblk_id = HWBLK_TMU0, 304 - }, 305 317 }; 306 318 307 319 static struct sh_timer_config tmu2_platform_data = { ··· 326 344 }, 327 345 .resource = tmu2_resources, 328 346 .num_resources = ARRAY_SIZE(tmu2_resources), 329 - .archdata = { 330 - .hwblk_id = HWBLK_TMU0, 331 - }, 332 347 }; 333 348 334 349 static struct sh_timer_config tmu3_platform_data = { ··· 353 374 }, 354 375 .resource = tmu3_resources, 355 376 .num_resources = ARRAY_SIZE(tmu3_resources), 356 - .archdata = { 357 - .hwblk_id = HWBLK_TMU1, 358 - }, 359 377 }; 360 378 361 379 static struct sh_timer_config tmu4_platform_data = { ··· 380 404 }, 381 405 .resource = tmu4_resources, 382 406 .num_resources = ARRAY_SIZE(tmu4_resources), 383 - .archdata = { 384 - .hwblk_id = HWBLK_TMU1, 385 - }, 386 407 }; 387 408 388 409 static struct sh_timer_config tmu5_platform_data = { ··· 407 434 }, 408 435 .resource = tmu5_resources, 409 436 .num_resources = ARRAY_SIZE(tmu5_resources), 410 - .archdata = { 411 - .hwblk_id = HWBLK_TMU1, 412 - }, 413 437 }; 414 438 415 439 static struct resource rtc_resources[] = { ··· 437 467 .id = -1, 438 468 .num_resources = ARRAY_SIZE(rtc_resources), 439 469 .resource = rtc_resources, 440 - .archdata = { 441 - .hwblk_id = HWBLK_RTC, 442 - }, 443 470 }; 444 471 445 472 static struct r8a66597_platdata r8a66597_data = { ··· 466 499 }, 467 500 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), 468 501 .resource = sh7723_usb_host_resources, 469 - .archdata = { 470 - .hwblk_id = HWBLK_USB, 471 - }, 472 502 }; 473 503 474 504 static struct resource iic_resources[] = { ··· 487 523 .id = 0, /* "i2c0" clock */ 488 524 .num_resources = ARRAY_SIZE(iic_resources), 489 525 .resource = iic_resources, 490 - .archdata = { 491 - .hwblk_id = HWBLK_IIC, 492 - }, 493 526 }; 494 527 495 528 static struct platform_device *sh7723_devices[] __initdata = {
-60
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
··· 275 275 .dev = { 276 276 .platform_data = &dma_platform_data, 277 277 }, 278 - .archdata = { 279 - .hwblk_id = HWBLK_DMAC0, 280 - }, 281 278 }; 282 279 283 280 static struct platform_device dma1_device = { ··· 284 287 .num_resources = ARRAY_SIZE(sh7724_dmae1_resources), 285 288 .dev = { 286 289 .platform_data = &dma_platform_data, 287 - }, 288 - .archdata = { 289 - .hwblk_id = HWBLK_DMAC1, 290 290 }, 291 291 }; 292 292 ··· 428 434 .id = -1, 429 435 .num_resources = ARRAY_SIZE(rtc_resources), 430 436 .resource = rtc_resources, 431 - .archdata = { 432 - .hwblk_id = HWBLK_RTC, 433 - }, 434 437 }; 435 438 436 439 /* I2C0 */ ··· 450 459 .id = 0, /* "i2c0" clock */ 451 460 .num_resources = ARRAY_SIZE(iic0_resources), 452 461 .resource = iic0_resources, 453 - .archdata = { 454 - .hwblk_id = HWBLK_IIC0, 455 - }, 456 462 }; 457 463 458 464 /* I2C1 */ ··· 472 484 .id = 1, /* "i2c1" clock */ 473 485 .num_resources = ARRAY_SIZE(iic1_resources), 474 486 .resource = iic1_resources, 475 - .archdata = { 476 - .hwblk_id = HWBLK_IIC1, 477 - }, 478 487 }; 479 488 480 489 /* VPU */ ··· 501 516 }, 502 517 .resource = vpu_resources, 503 518 .num_resources = ARRAY_SIZE(vpu_resources), 504 - .archdata = { 505 - .hwblk_id = HWBLK_VPU, 506 - }, 507 519 }; 508 520 509 521 /* VEU0 */ ··· 530 548 }, 531 549 .resource = veu0_resources, 532 550 .num_resources = ARRAY_SIZE(veu0_resources), 533 - .archdata = { 534 - .hwblk_id = HWBLK_VEU0, 535 - }, 536 551 }; 537 552 538 553 /* VEU1 */ ··· 559 580 }, 560 581 .resource = veu1_resources, 561 582 .num_resources = ARRAY_SIZE(veu1_resources), 562 - .archdata = { 563 - .hwblk_id = HWBLK_VEU1, 564 - }, 565 583 }; 566 584 567 585 /* BEU0 */ ··· 588 612 }, 589 613 .resource = beu0_resources, 590 614 .num_resources = ARRAY_SIZE(beu0_resources), 591 - .archdata = { 592 - .hwblk_id = HWBLK_BEU0, 593 - }, 594 615 }; 595 616 596 617 /* BEU1 */ ··· 617 644 }, 618 645 .resource = beu1_resources, 619 646 .num_resources = ARRAY_SIZE(beu1_resources), 620 - .archdata = { 621 - .hwblk_id = HWBLK_BEU1, 622 - }, 623 647 }; 624 648 625 649 static struct sh_timer_config cmt_platform_data = { ··· 646 676 }, 647 677 .resource = cmt_resources, 648 678 .num_resources = ARRAY_SIZE(cmt_resources), 649 - .archdata = { 650 - .hwblk_id = HWBLK_CMT, 651 - }, 652 679 }; 653 680 654 681 static struct sh_timer_config tmu0_platform_data = { ··· 674 707 }, 675 708 .resource = tmu0_resources, 676 709 .num_resources = ARRAY_SIZE(tmu0_resources), 677 - .archdata = { 678 - .hwblk_id = HWBLK_TMU0, 679 - }, 680 710 }; 681 711 682 712 static struct sh_timer_config tmu1_platform_data = { ··· 702 738 }, 703 739 .resource = tmu1_resources, 704 740 .num_resources = ARRAY_SIZE(tmu1_resources), 705 - .archdata = { 706 - .hwblk_id = HWBLK_TMU0, 707 - }, 708 741 }; 709 742 710 743 static struct sh_timer_config tmu2_platform_data = { ··· 729 768 }, 730 769 .resource = tmu2_resources, 731 770 .num_resources = ARRAY_SIZE(tmu2_resources), 732 - .archdata = { 733 - .hwblk_id = HWBLK_TMU0, 734 - }, 735 771 }; 736 772 737 773 ··· 757 799 }, 758 800 .resource = tmu3_resources, 759 801 .num_resources = ARRAY_SIZE(tmu3_resources), 760 - .archdata = { 761 - .hwblk_id = HWBLK_TMU1, 762 - }, 763 802 }; 764 803 765 804 static struct sh_timer_config tmu4_platform_data = { ··· 784 829 }, 785 830 .resource = tmu4_resources, 786 831 .num_resources = ARRAY_SIZE(tmu4_resources), 787 - .archdata = { 788 - .hwblk_id = HWBLK_TMU1, 789 - }, 790 832 }; 791 833 792 834 static struct sh_timer_config tmu5_platform_data = { ··· 811 859 }, 812 860 .resource = tmu5_resources, 813 861 .num_resources = ARRAY_SIZE(tmu5_resources), 814 - .archdata = { 815 - .hwblk_id = HWBLK_TMU1, 816 - }, 817 862 }; 818 863 819 864 /* JPU */ ··· 840 891 }, 841 892 .resource = jpu_resources, 842 893 .num_resources = ARRAY_SIZE(jpu_resources), 843 - .archdata = { 844 - .hwblk_id = HWBLK_JPU, 845 - }, 846 894 }; 847 895 848 896 /* SPU2DSP0 */ ··· 869 923 }, 870 924 .resource = spu0_resources, 871 925 .num_resources = ARRAY_SIZE(spu0_resources), 872 - .archdata = { 873 - .hwblk_id = HWBLK_SPU, 874 - }, 875 926 }; 876 927 877 928 /* SPU2DSP1 */ ··· 898 955 }, 899 956 .resource = spu1_resources, 900 957 .num_resources = ARRAY_SIZE(spu1_resources), 901 - .archdata = { 902 - .hwblk_id = HWBLK_SPU, 903 - }, 904 958 }; 905 959 906 960 static struct platform_device *sh7724_devices[] __initdata = {
+1 -2
arch/sh/kernel/cpu/shmobile/cpuidle.c
··· 17 17 #include <linux/export.h> 18 18 #include <asm/suspend.h> 19 19 #include <asm/uaccess.h> 20 - #include <asm/hwblk.h> 21 20 22 21 static unsigned long cpuidle_mode[] = { 23 22 SUSP_SH_SLEEP, /* regular sleep mode */ ··· 28 29 struct cpuidle_driver *drv, 29 30 int index) 30 31 { 31 - unsigned long allowed_mode = arch_hwblk_sleep_mode(); 32 + unsigned long allowed_mode = SUSP_SH_SLEEP; 32 33 ktime_t before, after; 33 34 int requested_state = index; 34 35 int allowed_state;
-2
arch/sh/kernel/time.c
··· 21 21 #include <linux/smp.h> 22 22 #include <linux/rtc.h> 23 23 #include <asm/clock.h> 24 - #include <asm/hwblk.h> 25 24 #include <asm/rtc.h> 26 25 27 26 /* Dummy RTC ops */ ··· 109 110 if (board_time_init) 110 111 board_time_init(); 111 112 112 - hwblk_init(); 113 113 clk_init(); 114 114 115 115 late_time_init = sh_late_time_init;