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

mfd: dbx500-prcmu: Drop DSI pll clock functions

The DSI PLLs are handled by the generic clock framework
since ages, this code is completely unused and misleading.
Delete it.

Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Linus Walleij and committed by
Lee Jones
2cce09eb f4181092

-98
-66
drivers/mfd/db8500-prcmu.c
··· 542 542 } 543 543 }; 544 544 545 - 546 - /* 547 - * Used by MCDE to setup all necessary PRCMU registers 548 - */ 549 - #define PRCMU_RESET_DSIPLL 0x00004000 550 - #define PRCMU_UNCLAMP_DSIPLL 0x00400800 551 - 552 - #define PRCMU_CLK_PLL_DIV_SHIFT 0 553 - #define PRCMU_CLK_PLL_SW_SHIFT 5 554 - #define PRCMU_CLK_38 (1 << 9) 555 - #define PRCMU_CLK_38_SRC (1 << 10) 556 - #define PRCMU_CLK_38_DIV (1 << 11) 557 - 558 - /* D=101, N=1, R=4, SELDIV2=0 */ 559 - #define PRCMU_PLLDSI_FREQ_SETTING 0x00040165 560 - 561 - #define PRCMU_ENABLE_PLLDSI 0x00000001 562 - #define PRCMU_DISABLE_PLLDSI 0x00000000 563 - #define PRCMU_RELEASE_RESET_DSS 0x0000400C 564 - #define PRCMU_DSI_PLLOUT_SEL_SETTING 0x00000202 565 - /* ESC clk, div0=1, div1=1, div2=3 */ 566 - #define PRCMU_ENABLE_ESCAPE_CLOCK_DIV 0x07030101 567 - #define PRCMU_DISABLE_ESCAPE_CLOCK_DIV 0x00030101 568 - #define PRCMU_DSI_RESET_SW 0x00000007 569 - 570 - #define PRCMU_PLLDSI_LOCKP_LOCKED 0x3 571 - 572 - int db8500_prcmu_enable_dsipll(void) 573 - { 574 - int i; 575 - 576 - /* Clear DSIPLL_RESETN */ 577 - writel(PRCMU_RESET_DSIPLL, PRCM_APE_RESETN_CLR); 578 - /* Unclamp DSIPLL in/out */ 579 - writel(PRCMU_UNCLAMP_DSIPLL, PRCM_MMIP_LS_CLAMP_CLR); 580 - 581 - /* Set DSI PLL FREQ */ 582 - writel(PRCMU_PLLDSI_FREQ_SETTING, PRCM_PLLDSI_FREQ); 583 - writel(PRCMU_DSI_PLLOUT_SEL_SETTING, PRCM_DSI_PLLOUT_SEL); 584 - /* Enable Escape clocks */ 585 - writel(PRCMU_ENABLE_ESCAPE_CLOCK_DIV, PRCM_DSITVCLK_DIV); 586 - 587 - /* Start DSI PLL */ 588 - writel(PRCMU_ENABLE_PLLDSI, PRCM_PLLDSI_ENABLE); 589 - /* Reset DSI PLL */ 590 - writel(PRCMU_DSI_RESET_SW, PRCM_DSI_SW_RESET); 591 - for (i = 0; i < 10; i++) { 592 - if ((readl(PRCM_PLLDSI_LOCKP) & PRCMU_PLLDSI_LOCKP_LOCKED) 593 - == PRCMU_PLLDSI_LOCKP_LOCKED) 594 - break; 595 - udelay(100); 596 - } 597 - /* Set DSIPLL_RESETN */ 598 - writel(PRCMU_RESET_DSIPLL, PRCM_APE_RESETN_SET); 599 - return 0; 600 - } 601 - 602 - int db8500_prcmu_disable_dsipll(void) 603 - { 604 - /* Disable dsi pll */ 605 - writel(PRCMU_DISABLE_PLLDSI, PRCM_PLLDSI_ENABLE); 606 - /* Disable escapeclock */ 607 - writel(PRCMU_DISABLE_ESCAPE_CLOCK_DIV, PRCM_DSITVCLK_DIV); 608 - return 0; 609 - } 610 - 611 545 u32 db8500_prcmu_read(unsigned int reg) 612 546 { 613 547 return readl(prcmu_base + reg);
-12
include/linux/mfd/db8500-prcmu.h
··· 525 525 void db8500_prcmu_enable_wakeups(u32 wakeups); 526 526 int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state); 527 527 int db8500_prcmu_request_clock(u8 clock, bool enable); 528 - int db8500_prcmu_disable_dsipll(void); 529 - int db8500_prcmu_enable_dsipll(void); 530 528 void db8500_prcmu_config_abb_event_readout(u32 abb_events); 531 529 void db8500_prcmu_get_abb_event_buffer(void __iomem **buf); 532 530 int db8500_prcmu_config_esram0_deep_sleep(u8 state); ··· 675 677 } 676 678 677 679 static inline int db8500_prcmu_request_clock(u8 clock, bool enable) 678 - { 679 - return 0; 680 - } 681 - 682 - static inline int db8500_prcmu_disable_dsipll(void) 683 - { 684 - return 0; 685 - } 686 - 687 - static inline int db8500_prcmu_enable_dsipll(void) 688 680 { 689 681 return 0; 690 682 }
-20
include/linux/mfd/dbx500-prcmu.h
··· 321 321 return db8500_prcmu_is_ac_wake_requested(); 322 322 } 323 323 324 - static inline int prcmu_disable_dsipll(void) 325 - { 326 - return db8500_prcmu_disable_dsipll(); 327 - } 328 - 329 - static inline int prcmu_enable_dsipll(void) 330 - { 331 - return db8500_prcmu_enable_dsipll(); 332 - } 333 - 334 324 static inline int prcmu_config_esram0_deep_sleep(u8 state) 335 325 { 336 326 return db8500_prcmu_config_esram0_deep_sleep(state); ··· 494 504 static inline bool prcmu_is_ac_wake_requested(void) 495 505 { 496 506 return false; 497 - } 498 - 499 - static inline int prcmu_disable_dsipll(void) 500 - { 501 - return 0; 502 - } 503 - 504 - static inline int prcmu_enable_dsipll(void) 505 - { 506 - return 0; 507 507 } 508 508 509 509 static inline int prcmu_config_esram0_deep_sleep(u8 state)