mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
spi: spi-rockchip-sfc: Support maximum dll cell setting for chips
Change-Id: I9bee5b29db8c1eb657720101f32c8d057328451c Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -212,6 +212,7 @@ struct rockchip_sfc {
|
||||
bool use_dma;
|
||||
bool sclk_x2_bypass;
|
||||
u32 max_iosize;
|
||||
u32 max_dll_cells;
|
||||
u32 dll_cells[SFC_MAX_CHIPSELECT_NUM];
|
||||
u16 version;
|
||||
struct gpio_desc *rst_gpio;
|
||||
@@ -255,6 +256,9 @@ static u32 rockchip_sfc_get_max_iosize(struct rockchip_sfc *sfc)
|
||||
|
||||
static u32 rockchip_sfc_get_max_dll_cells(struct rockchip_sfc *sfc)
|
||||
{
|
||||
if (sfc->max_dll_cells)
|
||||
return sfc->max_dll_cells;
|
||||
|
||||
if (sfc->version > SFC_VER_4)
|
||||
return SFC_DLL_CTRL0_DLL_MAX_VER5;
|
||||
else if (sfc->version == SFC_VER_4)
|
||||
@@ -953,6 +957,10 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
||||
sfc->sclk_x2_bypass = of_property_read_bool(sfc->dev->of_node,
|
||||
"rockchip,sclk-x2-bypass");
|
||||
|
||||
device_property_read_u32(&pdev->dev, "rockchip,max-dll", &sfc->max_dll_cells);
|
||||
if (sfc->max_dll_cells > SFC_DLL_CTRL0_DLL_MAX_VER5)
|
||||
sfc->max_dll_cells = SFC_DLL_CTRL0_DLL_MAX_VER5;
|
||||
|
||||
ret = rockchip_sfc_get_gpio_descs(master, sfc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to get gpio_descs\n");
|
||||
|
||||
Reference in New Issue
Block a user