]> git.baikalelectronics.ru Git - uboot.git/commit
usb: sunxi: Use proper reg_mask for clock gate, reset
authorJagan Teki <jagannadh.teki@gmail.com>
Thu, 28 Jun 2018 14:10:46 +0000 (19:40 +0530)
committerMarek Vasut <marex@denx.de>
Fri, 29 Jun 2018 08:52:18 +0000 (10:52 +0200)
commit56f1927b15a101c4dee3d44c3fbd0cae4ec39434
treebeaf46b1b6e74413aadd69d9e8071ec76e3773f8
parent00ef372620772a97ae03541f94e92d2aa9e162d9
usb: sunxi: Use proper reg_mask for clock gate, reset

Masking clock gate, reset register bits based on the
probed controller is proper only due to the assumption
that masking should start with 0 even thought the controller
has separate PHY or shared between OTG.

unfortunately these are fixed due to lack of separate
clock, reset drivers.

Say for example EHCI1 - EHCI3 in the datasheet (EHCI0 is for the OTG)
so we need to start reg_mask 0 - 2.

This patch calculated the mask, based on the register base
so that we can get the proper bits to set with respect to
probed controller.

We even do this masking by using PHY index specifier from dt,
but dev_read_addr_size is failing for 64-bit boards.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
drivers/usb/host/ehci-sunxi.c
drivers/usb/host/ohci-sunxi.c