linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] ACPI: ARM AMBA bus connector resource
@ 2013-10-22  0:33 brandon.anderson
  2013-10-22  0:33 ` [RFC PATCH 1/3] ACPI: Remove UART and KMI entries from DTS file brandon.anderson
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: brandon.anderson @ 2013-10-22  0:33 UTC (permalink / raw)
  To: linaro-acpi, linux-acpi
  Cc: lenb, rjw, naresh.bhat, hanjun.guo, graeme.gregory,
	Suravee.Suthikulpanit, Brandon Anderson

From: Brandon Anderson <brandon.anderson@amd.com>

This is a proposal for ACPI driver probing of the ARM AMBA devices currently listed under ‘iofpga’ in the RTSM dts file. The main addition is drivers/amba/acpi.c which fits the role of an AMBA bus ‘connector resource’ for ACPI using struct amba_device.

I have not yet figured out the implementation details regarding clocks (handled in the dts file with clock-names). However, I have included a proposed ASL format for clock information in the DSDT example below. With the last patch that hacks the clock info, this prototype will run on the Foundation and RTSM models.

These patches require Hanjun’s fixed-clock patches to be applied first on top of a Linaro ACPI kernel: https://git.linaro.org/gitweb?p=arm/acpi/leg-kernel.git;a=summary

Please comment on both the concept and the implementation.

Brandon Anderson (3):
  Remove UART and KMI entries from DTS file
  Prototype of AMBA bus 'connector resource' for ACPI
  Hack clock names to get prototype running

 arch/arm64/boot/dts/foundation-v8-acpi.dts        |   10 +-
 arch/arm64/boot/dts/rtsm_ve-aemv8a-acpi.dts       |    4 +
 arch/arm64/boot/dts/rtsm_ve-motherboard-acpi.dtsi |    4 +
 drivers/acpi/acpi_platform.c                      |    2 +
 drivers/amba/Makefile                             |    2 +-
 drivers/amba/acpi.c                               |  172 +++++++++++++++++++++
 drivers/clk/clk-fixed-rate.c                      |   15 +-
 7 files changed, 203 insertions(+), 6 deletions(-)
 create mode 100644 drivers/amba/acpi.c

-- 
1.7.9.5


---

		Device (AMBA) {
			Name (_HID, "AMBA0000") /* the parallel to "arm,primecell" in DTS */
			Name (_UID, 0)

			/* Define 'apb_pclk' as a default clock source since it is
			   common with devices below */
			Method(_DSM, 4, NotSerialized) {
				Store (Package (3)
				{
					"clock-name", "apb_pclk", "\\_SB_.CLK0",
				}, Local0)

				Return (Local0)
			}

			Device (KMI0) {
				Name (_ADR,0x1c060000)
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c060000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {44}
					})
					Return (RBUF)
				}
			}

			Device (KMI1) {
				Name (_ADR,0x1c070000)
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c070000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {45}
					})
					Return (RBUF)
				}
			}

			Device (SER0) {
				Name (_ADR,0x1c090000)                         // UART0
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c090000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {37}
					})
					Return (RBUF)
				}
			}

			Device (SER1) {
				Name (_ADR,0x1c0a0000)                         // UART1
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0a0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {38}
					})
					Return (RBUF)
				}
			}
			Device (SER2) {
				Name (_ADR,0x1c0b0000)                         // UART2
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0b0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {39}
					})
					Return (RBUF)
				}
			}

			Device (SER3) {
				Name (_ADR,0x1c0c0000)                         // UART3
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0c0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {40}
					})
					Return (RBUF)
				}
			}
		}


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-10-23 15:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  0:33 [RFC PATCH 0/3] ACPI: ARM AMBA bus connector resource brandon.anderson
2013-10-22  0:33 ` [RFC PATCH 1/3] ACPI: Remove UART and KMI entries from DTS file brandon.anderson
2013-10-23 11:28   ` Hanjun Guo
2013-10-22  0:33 ` [RFC PATCH 2/3] ACPI: Prototype of AMBA bus 'connector resource' brandon.anderson
2013-10-23 11:52   ` Hanjun Guo
2013-10-23 12:49     ` Graeme Gregory
2013-10-23 15:32       ` Anderson, Brandon
2013-10-22  0:33 ` [RFC PATCH 3/3] ACPI: Hack clock names to get prototype running brandon.anderson
2013-10-22  8:20 ` [RFC PATCH 0/3] ACPI: ARM AMBA bus connector resource Naresh Bhat
2013-10-22  8:41   ` Graeme Gregory
2013-10-22  9:19     ` Naresh Bhat
2013-10-22  8:42 ` Graeme Gregory
2013-10-23  0:13 ` Anderson, Brandon
2013-10-23  7:37   ` Hanjun Guo
2013-10-23 15:44     ` Anderson, Brandon
2013-10-23  9:44 ` Naresh Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).