summaryrefslogtreecommitdiff
path: root/drivers/soc/aspeed
AgeCommit message (Collapse)AuthorFilesLines
2021-05-26Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo2-15/+32
This is the 5.10.39 stable release Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-05-24Merge tag 'v5.10.39' into dev-5.10Joel Stanley1-1/+3
This is the 5.10.39 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-05-20Add chip unique id reading interfaceJae Hyun Yoo1-10/+109
This commit adds an interface for reading chip unique id value. Optionally, the id can be encrypted using a dts-supplied hash data. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> Change-Id: Ifd98500ea87b3d40e1738e583e077a74851fae35
2021-05-17soc: aspeed: mctp: Reject packets with invalid payload sizeIwona Winiarska1-9/+27
When we program TX command register, it requires packet data size in dwords. Since the aspeed-mctp driver doesn't implement MCTP protocol, it copies MCTP packet "as it" form userspace and uses size from write() syscall to program TX command. If the size from write() doesn't match the payload length in packet PCIe VDM header, it causes MCTP HW to stop working and we are not able to reset it without platform power cycle. To avoid HW issues, let's verify if the data size from write() matches the payload length in PCIe VDM header. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Change-Id: I6da14babadcc65cb2ba4a2b685495d1baa92c169
2021-05-14soc: aspeed: fix a ternary sign expansion bugDan Carpenter1-1/+3
[ Upstream commit 5ffa828534036348fa90fb3079ccc0972d202c4a ] The intent here was to return negative error codes but it actually returns positive values. The problem is that type promotion with ternary operations is quite complicated. "ret" is an int. "copied" is a u32. And the snoop_file_read() function returns long. What happens is that "ret" is cast to u32 and becomes positive then it's cast to long and it's still positive. Fix this by removing the ternary so that "ret" is type promoted directly to long. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Patrick Venture <venture@google.com> Link: https://lore.kernel.org/r/YIE90PSXsMTa2Y8n@mwanda Link: https://lore.kernel.org/r/20210423000919.1249474-1-joel@jms.id.au' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11fixup! soc: aspeed: mctp: Expose internal kernel APIIwona Winiarska1-2/+1
Fix warnings: drivers/soc/aspeed/aspeed-mctp.c: In function 'aspeed_mctp_receive_packet': drivers/soc/aspeed/aspeed-mctp.c:719:27: warning: unused variable 'packet' [-Wunused-variable] 719 | struct mctp_pcie_packet *packet; | ^~~~~~ drivers/soc/aspeed/aspeed-mctp.c: In function 'aspeed_mctp_flush_rx_queue': drivers/soc/aspeed/aspeed-mctp.c:741:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 741 | while (packet = ptr_ring_consume_bh(&client->rx_queue)) | ^~~~~~ Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Change-Id: I74d3c4ea18ed82037345236f87ed1b08d98267dd
2021-04-28soc: aspeed: Adapt to new LPC device tree layoutChia-Wei, Wang2-14/+29
Add check against LPC device v2 compatible string to ensure that the fixed device tree layout is adopted. The LPC register offsets are also fixed accordingly. Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20210319062752.145730-5-andrew@aj.id.au Signed-off-by: Joel Stanley <joel@jms.id.au> (cherry picked from commit 489774ff5db943642751f4f0fdac9033239208c6) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-04-12mailbox: ioctl to fetch mailbox sizeArun P. Mohanan1-0/+20
The size of mailbox differ from AST2500, AST2600 A0 and A1. Add an ioctl support to fetch the mailbox size. Tested: Verfied ioctl call returns mailbox size as expected. Change-Id: I4e261aaf8aa3fb108d6ad152d30a17b114d70ccd Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
2021-03-15Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo1-10/+29
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11soc: aspeed: Miscellaneous control interfacesAndrew Jeffery3-0/+199
The ASPEED BMC SoCs have many knobs and switches that are sometimes design-specific and often defy any approach to unify them under an existing subsystem. Add a driver to translate a devicetree table into sysfs entries to expose bits and fields for manipulation from userspace. This encompasses concepts from scratch registers to boolean conditions to enable or disable host interface features. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11soc: aspeed: mctp: Export function used to read BDFIwona Winiarska1-0/+19
Recently, aspeed-mctp driver functionality was extended to store BDF values for already discovered MCTP endpoints on PCIe bus. Let's expose kernel API to read BDF based on endpoint ID. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-03-11Enable mailbox interruptsYong Li1-49/+90
Support interrupt generation for both 16 and 32 mailbox registers. Tested: After applied this patch, write the mailbox registers from BIOS side, the misc manager can capture the new mailbox data. Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2021-03-11Move Aspeed eSPI driver to soc/aspeed treeJae Hyun Yoo3-0/+523
This commit moves Aspeed eSPI driver from misc to soc/aspeed tree to make correct probing order for LPC and eSPI driver. Since LPC runs over eSPI, eSPI driver should be registered ahead of LPC driver. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11soc: aspeed: mctp: Register peci_mctp deviceIwona Winiarska1-1/+9
Now that it is possible to send PECI frames via aspeed-mctp driver, let's add aspeed-peci-mctp node to allow bind peci-mctp-aspeed adapter driver. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-03-11soc: aspeed: mctp: Fix TX hangs and optimize TX logicAndrzej Kacprowski1-58/+42
Currently driver submits 1 (or rarely more than 1) packet then waits until HW signals transmission completion before sending more packets. This logic requires interrupt after each packet, aspeed_mctp_tx_tasklet() is invoked twice per packet. New logic uses TX ring correctly, packets are added to the end of circular ring buffer. The driver does not have to wait for HW to complete transmission of enqueued packets before adding more packets to TX queue. Interrupt is generated only if TX ring if full. This change significantly improves packet transmission performance: PECI GetTemp command takes ~25us instead of ~30us. This change also fixes sporadic TX hangs during host reboot seen with current driver. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Update source EID in TX packetsAndrzej Kacprowski1-1/+26
If self EID is known then the driver updates source EID in MCTP header of sent packets. For MCTP control packets the source EID is not updated as it may disrupt MCTP discovery flow. Self EID is determined from list of known endpoints provided by ASPEED_MCTP_IOCTL_SET_EID_INFO IOCTL. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Fix RX hangs and RX packet missesAndrzej Kacprowski1-76/+133
Under even moderate traffic the driver can miss a lot of received packets and eventually stops receiving packets at all. There is an bug in AST2600 RX logic where HW does not wrap around RX read buffer pointer correctly. Current driver workaround for this bug resets RX HW read pointer to 0 whenever it reaches end of the RX buffer ring - this does not work properly if more than 1 packet is received while RX pointer is close to the end of the RX buffer ring - in such case HW can detect ring full condition and stop RX. The new workaround has different logic: it sets HW buffer count to 4n - 1 and updates driver maintained RX write pointer so it tracks HW read pointer to prevent hardware from stopping. Received packets are located by looking into RX data buffers rather that HW read pointer that contains incorrect value anyway. Driver never resets HW read pointer, HW is receiving packets without any interference form the driver. Also handle RX_CMD_NO_MORE_INT - if RX ring if full then HW will clear RX_CMD_READY bit and we need to re-enable it once we free some space in RX ring. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Expose internal kernel APIIwona Winiarska1-39/+74
Some protocols that are already implemented in kernel can be encapsulated in MCTP packets. To allow use aspeed-mctp internally in kernel space, let's allow to use selected functions outside of aspeed-mctp. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-03-11soc: aspeed: mctp: Fix header swapping consistencyIwona Winiarska1-24/+23
Right now, TX ring contains packets with PCIe header already swapped to little endian (byte order expected by HW), while RX ring contains packets with PCIe header already swapped to network order (expected by userspace). Let's keep TX packets in network order and swap before write to HW buffer. To make it more readable, let's extract swapping into a helper function. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-03-11aspeed-mctp: Add EID information related ioctlsKarol Wachowski1-0/+178
Implement two new ioctls for storing EID related information: * ASPEED_MCTP_IOCTL_GET_EID_INFO * ASPEED_MCTP_IOCTL_SET_EID_INFO Driver stores EID mapping in a list which is traversed when one tries to get information using ASPEED_MCTP_IOCTL_GET_EID_INFO ioctl, when given EID mapping is not found in the list, next entry is returned. When there are no entries with EIDs higher than specified in the IOCTL call -ENODEV is returned. Whenever new information about EID mapping is stored with ASPEED_MCTP_IOCTL_SET_EID_INFO ioctl driver empties exsiting list of mappings and creates new one based on user input. After insertion list is sorted by EID. Invalid input such as duplicated EIDs will cause driver to return -EINVAL. Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
2021-03-11soc: aspeed: mctp: Pick uevents consistentlyIwona Winiarska1-3/+2
Uevent objects are different for PCI_READY=0 and PCI_READY=1. Let's make uevents consistent and use the same object in both cases. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-03-11soc: aspeed: mctp: Add API to register client for MCTP typeAndrzej Kacprowski1-2/+198
MCTP client can register for receiving packets with selected MCTP message type or PCIE vendor defined message type. Vendor defined type is 2 bytes but in Intel VDMs the first byte is variable and only the second byte contains constant message type - to support this use case we have to specify 2 byte mask that is applied to packet type before comparing with registered vendor type. When MCTP packet arrives its header is compared with a list of registered (vendor) types. If no client registered for packet's (vendor) type then the packet is dispatched to the default client. Fragmented packets are not considered for type matching. Only one client can register for given (vendor) type. Client can register for multiple (vendor) types. All packet fields must be specified in big endian byte order. This feature allows to support multiple clients simultaneously but only one client per (vendor) message type. For example we can have PECI client in kernel that uses PECI vendor message type, dcpmm daemon in user space that handles NVDIMM vendor type messages and mctpd service that handles MCTP control and PLDM message types. tested with peci_mctp_test application Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Add IOCTL to register default clientAndrzej Kacprowski1-8/+22
Add IOCTL to register given client as default client that receives all packets that were not dispatched to other clients. This IOCTL is intended to be used by mctpd service or test application that should receive all packets that are not claimed by other clients. mctpd service might not be the first user space client since dcpmm or telemetry client can start before mctpd or mctpd can crash and be restarted automatically at any time. To preserve backward compatibility with mctpd, the first user space client will be registered automatically as default client - once mctpd is modified to call ASPEED_MCTP_IOCTL_REGISTER_DEFAULT_HANDLER we can remove this workaround. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Move wait queue to clientAndrzej Kacprowski1-7/+5
Whenever MCTP packet arrives it is dispatched to a specific client - there is no need to wake up all clients waiting in aspeed_mctp_poll(). Move wait queue from driver structure to client structure. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Add support for multiple clientsAndrzej Kacprowski1-104/+93
This commit adds minimal support for multiple clients. Currently packets are dispatched to default client. Support for dispatching incoming packets to different clients will be added in subsequent patches. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11soc: aspeed: mctp: Add initial driver for ast2600-mctpIwona Winiarska3-0/+1214
Currently, there is no proper MCTP networking subsystem in Linux. Until we are able to work out the details of that, we are going to expose HW to userspace using raw read/write interface. Because of that, this driver is not intended to be submitted upstream. Here we are providing a simple device driver for AST2600 MCTP controller. v2: Added workarounds for BMC reboot/reset, corrected endianess comment, changed TX_BUF_ADDR to be consistent, fixed typos. v3: Added workaround for RX hang, added swapping PCIe VDM header to network order, corrected buffer allocation size. v4: Fixed TX broken after sending 32 byte packet Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
2021-03-11Enabling interrupt based mailboxArun P. Mohanan1-33/+69
Modifying the mailbox driver to use FIFO queue while using interrupt. Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
2021-03-11misc: 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>
2021-03-11misc: Add clock control logic into Aspeed LPC SNOOP driverJae Hyun Yoo1-3/+27
If LPC SNOOP driver is registered ahead of lpc-ctrl module, LPC SNOOP block will be enabled without heart beating of LCLK until lpc-ctrl enables the LCLK. This issue causes improper handling on host interrupts when the host sends interrupt in that time frame. Then kernel eventually forcibly disables the interrupt with dumping stack and printing a 'nobody cared this irq' message out. To prevent this issue, all LPC sub-nodes should enable LCLK individually so this patch adds clock control logic into the LPC SNOOP driver. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
2021-03-11Implement a memory driver share memoryCheng C Yang3-0/+172
Implement a memory driver for BMC to access VGA share memory. The driver is used by MDRV2. In MDRV2 BIOS will send whole SMBIOS table to VGA memory and BMC can get the table from VGA memory through this driver. Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
2021-03-11Aspeed LPC SIO driverYong Li3-0/+418
Add lpc sio device driver for AST2500/2400 Signed-off-by: Yong Li <yong.b.li@intel.com> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11misc: aspeed: add lpc mbox driverJae Hyun Yoo3-0/+385
This commit adds back the lpc mbox driver which was removed from the openbmc linux dev-5.2 tree. This driver should be rewritten later. Signed-off-by: Cyril Bur <cyrilbur@gmail.com>" Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
2021-03-09soc: aspeed: socinfo: Add new systemsJoel Stanley1-9/+26
Aspeed's u-boot sdk has been updated with the SoC IDs for the AST2605 variant, as well as A2 and A3 variants of the 2600 family. >From u-boot's arch/arm/mach-aspeed/ast2600/scu_info.c: SOC_ID("AST2600-A0", 0x0500030305000303), SOC_ID("AST2600-A1", 0x0501030305010303), SOC_ID("AST2620-A1", 0x0501020305010203), SOC_ID("AST2600-A2", 0x0502030305010303), SOC_ID("AST2620-A2", 0x0502020305010203), SOC_ID("AST2605-A2", 0x0502010305010103), SOC_ID("AST2600-A3", 0x0503030305030303), SOC_ID("AST2620-A3", 0x0503020305030203), SOC_ID("AST2605-A3", 0x0503010305030103), Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver") Link: https://lore.kernel.org/r/20210210114651.334324-1-joel@jms.id.au (cherry picked from commit d0e72be77e7995923fac73f27cf7a75d3d1a4dec) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-09soc: aspeed: Fix a reference leak in aspeed_socinfo_init()Dan Carpenter1-1/+3
This needs to call of_node_put(np) before returning if of_iomap() fails. Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20201113100850.GA168908@mwanda (cherry picked from commit 0f0c9c702241d839dbb1d355b77e5712a5a5793f) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-04Merge tag 'v5.10.20' into dev-5.10Joel Stanley1-3/+27
This is the 5.10.20 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-04soc: aspeed: snoop: Add clock control logicJae Hyun Yoo1-3/+27
[ Upstream commit 3f94cf15583be554df7aaa651b8ff8e1b68fbe51 ] If LPC SNOOP driver is registered ahead of lpc-ctrl module, LPC SNOOP block will be enabled without heart beating of LCLK until lpc-ctrl enables the LCLK. This issue causes improper handling on host interrupts when the host sends interrupt in that time frame. Then kernel eventually forcibly disables the interrupt with dumping stack and printing a 'nobody cared this irq' message out. To prevent this issue, all LPC sub-nodes should enable LCLK individually so this patch adds clock control logic into the LPC SNOOP driver. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Signed-off-by: John Wang <wangzhiqiang.bj@bytedance.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20201208091748.1920-1-wangzhiqiang.bj@bytedance.com Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-09soc: aspeed: xdma: Return -EFAULT if copy_from_user() failsDan Carpenter1-3/+2
The copy_from_user() function returns the number of bytes remaining which we weren't able to copy. This should return -EFAULT to the user. OpenBMC-Staging-Count: 2 Fixes: 86609baa4217 ("soc: aspeed: xdma: Add user interface") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20200930090334.GB621698@mwanda Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: xdma: Add reset ioctlEddie James1-0/+32
Users of the XDMA engine need a way to reset it if something goes wrong. Problems on the host side, or user error, such as incorrect host address, may result in the DMA operation never completing and no way to determine what went wrong. Therefore, add an ioctl to reset the engine so that users can recover in this situation. Signed-off-by: Eddie James <eajames@linux.ibm.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/1588697905-23444-5-git-send-email-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: xdma: Add user interfaceEddie James1-0/+218
This commits adds a miscdevice to provide a user interface to the XDMA engine. The interface provides the write operation to start DMA operations. The DMA parameters are passed as the data to the write call. The actual data to transfer is NOT passed through write. Note that both directions of DMA operation are accomplished through the write command; BMC to host and host to BMC. The XDMA driver reserves an area of physical memory for DMA operations, as the XDMA engine is restricted to accessing certain physical memory areas on some platforms. This memory forms a pool from which users can allocate pages for their usage with calls to mmap. The space allocated by a client will be the space used in the DMA operation. For an "upstream" (BMC to host) operation, the data in the client's area will be transferred to the host. For a "downstream" (host to BMC) operation, the host data will be placed in the client's memory area. Poll is also provided in order to determine when the DMA operation is complete for non-blocking IO. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/1588697905-23444-4-git-send-email-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: Add XDMA Engine DriverEddie James3-0/+966
The XDMA engine embedded in the AST2500 and AST2600 SOCs performs PCI DMA operations between the SOC (acting as a BMC) and a host processor in a server. This commit adds a driver to control the XDMA engine and adds functions to initialize the hardware and memory and start DMA operations. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/1588697905-23444-3-git-send-email-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed-lpc-ctrl: Fix driver nameJoel Stanley1-1/+1
Clarify the string now that it supports the AST2600 too. Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed-lpc-ctrl: Fix whitespaceJoel Stanley1-2/+2
Some misaligned indentation I noticed when applying another patch. Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: 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. Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20200312121413.294384-1-joel@jms.id.au Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed-lpc-ctrl: 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. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20191016233950.10100-1-andrew@aj.id.au Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: lpc: Add AST2600 compatible stringsBrad Bishop2-0/+3
The AST2600 has the same lpc-ctrl and lpc-snoop devices as the AST2500. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20190925125610.12096-4-bradleyb@fuzziesquirrel.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: Add soc info driverJoel Stanley3-0/+141
This adds a SOC_BUS info driver for the ASPEED platform. The full ID table is preserved in this commit message in case someone finds a need to change the implemntation in the future. { "AST1100-A0", 0x00000200 }, { "AST1100-A1", 0x00000201 }, { "AST1100-A2", 0x00000202 }, { "AST1100-A3", 0x00000202 }, { "AST2050-A0", 0x00000200 }, { "AST2050-A1", 0x00000201 }, { "AST2050-A2", 0x00000202 }, { "AST2050-A3", 0x00000202 }, { "AST2100-A0", 0x00000300 }, { "AST2100-A1", 0x00000301 }, { "AST2100-A2", 0x00000302 }, { "AST2100-A3", 0x00000302 }, { "AST2150-A0", 0x00000202 }, { "AST2150-A1", 0x00000202 }, { "AST2200-A0", 0x00000102 }, { "AST2200-A1", 0x00000102 }, { "AST2300-A0", 0x01000003 }, { "AST2300-A1", 0x01010303 }, { "AST1300-A1", 0x01010003 }, { "AST1050-A1", 0x01010203 }, { "AST2400-A0", 0x02000303 }, { "AST2400-A1", 0x02010303 }, { "AST1400-A1", 0x02010103 }, { "AST1250-A1", 0x02010303 }, { "AST2500-A0", 0x04000303 }, { "AST2510-A0", 0x04000103 }, { "AST2520-A0", 0x04000203 }, { "AST2530-A0", 0x04000403 }, { "AST2500-A1", 0x04010303 }, { "AST2510-A1", 0x04010103 }, { "AST2520-A1", 0x04010203 }, { "AST2530-A1", 0x04010403 }, { "AST2500-A2", 0x04030303 }, { "AST2510-A2", 0x04030103 }, { "AST2520-A2", 0x04030203 }, { "AST2530-A2", 0x04030403 }, { "AST2600-A0", 0x05000303 }, { "AST2600-A1", 0x05010303 }, { "AST2600-A2", 0x05020303 }, { "AST2620-A1", 0x05010203 }, { "AST2620-A2", 0x05020203 }, Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20200921091644.133107-3-joel@jms.id.au Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09soc: aspeed: Improve kconfigJoel Stanley1-16/+20
Reword the kconfig text to be consistent and reflect that most drivers are available for all supported ASPEED chips (2400, 2500 and 2600). Rearrange the symbols the SoC drivers depend on so the menu doesn't appear unless you are building for ASPEED for compile testing. The SYSCON_MFD and REGMAP options are usually selected by drivers that need them, so do this. Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20200916125731.784527-1-joel@jms.id.au Signed-off-by: Joel Stanley <joel@jms.id.au>
2020-06-13treewide: replace '---help---' in Kconfig files with 'help'Masahiro Yamada1-1/+1
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), the number of '---help---' has been gradually decreasing, but there are still more than 2400 instances. This commit finishes the conversion. While I touched the lines, I also fixed the indentation. There are a variety of indentation styles found. a) 4 spaces + '---help---' b) 7 spaces + '---help---' c) 8 spaces + '---help---' d) 1 space + 1 tab + '---help---' e) 1 tab + '---help---' (correct indentation) f) 1 tab + 1 space + '---help---' g) 1 tab + 2 spaces + '---help---' In order to convert all of them to 1 tab + 'help', I ran the following commend: $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/' Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2019-12-05soc: aspeed: Fix snoop_file_poll()'s return typeLuc Van Oostenryck1-2/+2
snoop_file_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. Link: https://lore.kernel.org/r/20191121051851.268726-1-joel@jms.id.au Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Olof Johansson <olof@lixom.net>
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>