Skip to content

RFC MIPS: Alchemy: clock framework support

Manuel Lauss linux-mips lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest11 patches 2 repliesIn review
  2. v1 RFC2 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11MIPS: Alchemy: au1000 header file cleanuparch/mips/alchemy/board-mtx1.c arch/mips/alchemy/board-xxs1500.c arch/mips/alchemy/common/clocks.c +26 more+1826 -19790 replies
2/11MIPS: Alchemy: clock framework integration of onchip clocksarch/mips/Kconfig arch/mips/alchemy/common/Makefile arch/mips/alchemy/common/clock.c +1 more+1116 -20 replies
3/11MIPS: Alchemy: platform: use clk framework for uartsarch/mips/alchemy/common/clocks.c arch/mips/alchemy/common/platform.c arch/mips/include/asm/mach-au1x00/au1000.h+12 -220 replies
4/11MIPS: Alchemy: usb: use clk frameworkarch/mips/alchemy/common/usb.c+40 -70 replies
5/11MIPS: Alchemy: pci: use clk framework to enable PCI clockarch/mips/pci/pci-alchemy.c+22 -12 replies
6/11MIPS: Alchemy: db1200: use clk frameworkarch/mips/alchemy/devboards/db1200.c+20 -250 replies
7/11MIPS: Alchemy: irda: use clk frameworkdrivers/net/irda/au1k_ir.c+46 -20 replies
8/11MIPS: Alchemy: au1100fb: use clk frameworkarch/mips/alchemy/devboards/db1000.c drivers/video/fbdev/au1100fb.c drivers/video/fbdev/au1100fb.h+37 -140 replies
9/11MIPS: Alchemy: au1200fb: use clk frameworkdrivers/video/fbdev/au1200fb.c+14 -50 replies
10/11MIPS: Alchemy: au1xmmc: use clk frameworkdrivers/mmc/host/au1xmmc.c+21 -100 replies
11/11MIPS: Alchemy: remove old clock supportarch/mips/alchemy/common/Makefile arch/mips/alchemy/common/clocks.c arch/mips/alchemy/common/setup.c +1 more+1 -1710 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 00/11] MIPS: Alchemy: clock framework support

Hello,

Here's another round of patches which expose the configurable parts of the onchip clocktree of Alchemy SoCs to the common clock framework.

v2: split original patch #2 into a clock framework patch and multiple
driver adjustment patches, suggested by Mike Turquette.

patch #1 is a big(ger) cleanup of the au1000.h header which presented
itself during preparation of the other patches. It's required for the others to compile.
patch #2 adds the clock framework integration,
patches #3-#11 adjust various setup files and drivers to use the clock
framework to get at required clocks and frequencies.

The whole series has been tested on DB1300 and DB1500 boards (i.e. the
newest variant and an older one with the inflexible dividers), every- thing works as before.

Example clock tree dumps: All clocks listed here have been set up by firmware.

db1300 ~ # cat /sys/kernel/debug/clk/clk_summary
clock enable_cnt prepare_cnt rate accuracy
--------------------------------------------------------------------------------

 root_clk                                 3            3    12000000          0
    auxpll2_clk                           1            1   756000000          0
       fg5_clk                            0            0   252000000          0
          maebsa_clk                      0            0   252000000          0
       fg4_clk                            0            0   189000000          0
          maempe_clk                      0            0   189000000          0
       fg3_clk                            0            0   252000000          0
          gpemgp_clk                      0            0   252000000          0
       fg2_clk                            1            1   189000000          0
          EXTCLK1                         1            1    47250000          0
       fg1_clk                            0            0   756000000          0
       fg0_clk                            0            0   756000000          0
    auxpll_clk                            1            1   192000000          0
       EXTCLK0                            0            0   192000000          0
       lcd_intclk                         1            1    96000000          0
    cpu_clk                               1            1   660000000          0
       sysbus_clk                         1            1   330000000          0
          mem_clk                         0            0   330000000          0
          periph_clk                      3            3   165000000          0
             lr_clk                       0            0   165000000          0

db1500 ~ # cat /sys/kernel/debug/clk/clk_summary
clock enable_cnt prepare_cnt rate accuracy
--------------------------------------------------------------------------------

 root_clk                                 2            2    12000000          0 
    auxpll_clk                            2            2   384000000          0 
       EXTCLK1                            0            0   384000000          0 
       EXTCLK0                            0            0   384000000          0 
       fg2_clk                            1            1    64000000          0 
          pci_clko                        1            1    64000000          0 
       fg1_clk                            1            1    96000000          0 
          usbh_clk                        1            1    48000000          0 
          usbd_clk                        0            0    48000000          0 
    cpu_clk                               1            1   396000000          0 
       fg5_clk                            0            0   198000000          0 
       fg4_clk                            0            0   198000000          0 
       fg3_clk                            0            0   198000000          0 
       fg0_clk                            0            0   198000000          0 
       sysbus_clk                         1            1   198000000          0 
          mem_clk                         0            0    99000000          0 
          periph_clk                      1            1    99000000          0 
             lr_clk                       0            0    99000000          0 

Feedback very much appreciated!

Thank you,
Manuel Lauss

Manuel Lauss (11):
MIPS: Alchemy: au1000 header file cleanup
MIPS: Alchemy: clock framework integration of onchip clocks
MIPS: Alchemy: platform: use clk framework for uarts
MIPS: Alchemy: usb: use clk framework
MIPS: Alchemy: pci: use clk framework to enable PCI clock
MIPS: Alchemy: db1200: use clk framework
MIPS: Alchemy: irda: use clk framework
MIPS: Alchemy: au1100fb: use clk framework
MIPS: Alchemy: au1200fb: use clk framework
MIPS: Alchemy: au1xmmc: use clk framework
MIPS: Alchemy: remove old clock support

 arch/mips/Kconfig                               |    1 +
 arch/mips/alchemy/board-mtx1.c                  |    4 +-
 arch/mips/alchemy/board-xxs1500.c               |    4 +-
 arch/mips/alchemy/common/Makefile               |    4 +-
 arch/mips/alchemy/common/clock.c                | 1097 ++++++++++
 arch/mips/alchemy/common/clocks.c               |  105 -
 arch/mips/alchemy/common/dbdma.c                |   22 +-
 arch/mips/alchemy/common/dma.c                  |   15 +-
 arch/mips/alchemy/common/irq.c                  |    4 +-
 arch/mips/alchemy/common/platform.c             |   15 +-
 arch/mips/alchemy/common/power.c                |   88 +-
 arch/mips/alchemy/common/setup.c                |   18 +-
 arch/mips/alchemy/common/time.c                 |   25 +-
 arch/mips/alchemy/common/usb.c                  |   47 +-
 arch/mips/alchemy/devboards/db1000.c            |   19 +-
 arch/mips/alchemy/devboards/db1200.c            |   64 +-
 arch/mips/alchemy/devboards/db1300.c            |   10 +-
 arch/mips/alchemy/devboards/db1550.c            |   25 +-
 arch/mips/alchemy/devboards/pm.c                |   39 +-
 arch/mips/include/asm/mach-au1x00/au1000.h      | 2515 ++++++++++-------------
 arch/mips/include/asm/mach-au1x00/au1000_dma.h  |   51 +-
 arch/mips/include/asm/mach-au1x00/gpio-au1000.h |   66 +-
 arch/mips/pci/pci-alchemy.c                     |   88 +-
 drivers/mmc/host/au1xmmc.c                      |  197 +-
 drivers/mtd/nand/au1550nd.c                     |   52 +-
 drivers/net/ethernet/amd/au1000_eth.c           |  155 +-
 drivers/net/irda/au1k_ir.c                      |   48 +-
 drivers/rtc/rtc-au1xxx.c                        |   18 +-
 drivers/spi/spi-au1550.c                        |   66 +-
 drivers/video/fbdev/au1100fb.c                  |   39 +-
 drivers/video/fbdev/au1100fb.h                  |    1 +
 drivers/video/fbdev/au1200fb.c                  |   47 +-
 sound/soc/au1x/psc-ac97.c                       |  140 +-
 sound/soc/au1x/psc-i2s.c                        |  100 +-
 sound/soc/au1x/psc.h                            |   22 +-
 35 files changed, 3064 insertions(+), 2147 deletions(-)
 create mode 100644 arch/mips/alchemy/common/clock.c
 delete mode 100644 arch/mips/alchemy/common/clocks.c
Signature · 1 line
2.0.0