summaryrefslogtreecommitdiff
path: root/drivers/soc/aspeed/aspeed-lpc-ctrl.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-06misc: Block error printing on probe defer case in Aspeed LPC ctrlJae Hyun Yoo1-2/+5
This commit adds a checking code when it gets -EPROBE_DEFER while getting a clock resource. In this case it doesn't need to print out an error message because the probing will be re-visited. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2020-08-06soc: aspeed-lpc-ctrl: Fix printf warningJoel Stanley1-4/+4
>> drivers/soc/aspeed/aspeed-lpc-ctrl.c:247:17: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] Documentation/core-api/printk-formats.rst suggests %pa should work for resouce_size_t, but it did not: %pa[p] 0x01234567 or 0x0123456789abcdef For printing a phys_addr_t type (and its derivatives, such as resource_size_t) which can vary based on build options, regardless of the width of the CPU data path. Instead cast to an integer which works as all aspeed processors are 32-bit. OpenBMC-Staging-Count: 2 Signed-off-by: Joel Stanley <joel@jms.id.au>
2020-08-06soc: aspeed-lpc-ctrl: LPC to AHB mapping on ast2600Joel Stanley1-0/+17
The ast2600 disables the mapping of AHB memory regions by default, only allowing the LPC window to point to SPI NOR. In order to point the window to any AHB address, an ast2600 specific bit must be toggled. OpenBMC-Staging-Count: 3 Signed-off-by: Joel Stanley <joel@jms.id.au>
2020-08-06soc: aspeed: Fail probe of lpc-ctrl if reserved memory is not alignedAndrew Jeffery1-0/+13
Alignment is a hardware constraint of the LPC2AHB bridge, and misaligned reserved memory will present as corrupted data. OpenBMC-Staging-Count: 4 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2020-08-06soc: aspeed: lpc: Add G6 compatible stringsBrad Bishop1-0/+1
The AST2600(G6) has the same lpc-ctrl and lpc-snoop devices as the AST2500. OpenBMC-Staging-Count: 4 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2019-06-25Merge tag 'aspeed-5.3-soc' of ↵Olof Johansson1-23/+38
git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/drivers ASPEED SoC updates for 5.3 LPC control driver changes and a fix. * tag 'aspeed-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: soc: aspeed: lpc-ctrl: Fix probe error handling soc: aspeed: lpc-ctrl: make parameter optional Signed-off-by: Olof Johansson <olof@lixom.net>
2019-06-22soc: aspeed: lpc-ctrl: Fix probe error handlingJoel Stanley1-2/+3
gcc warns that a mising "flash" phandle node leads to undefined behavior later: drivers/soc/aspeed/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe': drivers/soc/aspeed/aspeed-lpc-ctrl.c:201:18: error: '*((void *)&resm+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized] Only set the flash base and size if we find a phandle in the device tree. Reported-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Vijay Khemka <vijaykhemka@fb.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2019-06-17soc: aspeed: lpc-ctrl: make parameter optionalVijay Khemka1-22/+36
Making memory-region and flash as optional parameter in device tree if user needs to use these parameter through ioctl then need to define in devicetree. Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-29soc: add aspeed folder and misc driversPatrick Venture1-0/+300
Create a SoC folder for the ASPEED parts and place the misc drivers currently present into this folder. These drivers are not generic part drivers, but rather only apply to the ASPEED SoCs. Signed-off-by: Patrick Venture <venture@google.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Olof Johansson <olof@lixom.net>