History log of /fuchsia/zircon/system/dev/board/astro/astro-rawnand.c
Revision Date Author Comments
# 6c2ccb39 19-Sep-2018 Mike Voydanoff <voydanoff@google.com>

[gpio] Refactor the GPIO protocol

This is a first step in a move toward using protocols to represent
individual resources. A similar change will be made to the I2C protocol
to bring it in line with how I2C is used on x86 platforms.

From the client's point of view, an instance of the ZX_PROTOCOL_GPIO
protocol now represents a single pin. The protocol remains the same,
except the "uint32_t index" has been removed from all the protocol functions.

For devices that have only one GPIO resource assigned to them, the driver
can simply call device_get_protocol() to access the GPIO protocol for the pin.
To for devices with more than one GPIO pins, a new API in the platform bus called
pdev_get_protocol() must be used instead.

In addition, we add a new protocol ZX_PROTOCOL_GPIO_IMPL, which is now
implemented by the GPIO drivers. This protocol is essentially the same as
the old GPIO protocol, except "index" has been renamed "pin".
Board drivers may use this protocol directly when doing low level system
configuration, specifying pin numbers directly.

TEST: Booted on VIM2 and Hikey.
On VIM2, USB, display, ethernet and the GPIO test driver are working properly
On Hikey, the system boots and USB is functional.

Change-Id: I44f1bc11ad9793543361a2d19d7a2de4458c334b


# 5c6d16a0 29-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[dev][platform-bus] separate regular metadata from bootloader metadata

In the platform bus protocol, we use the pbus_metadata_t struct
for board drivers to pass metadata to the platform devices.
Instead of overloading this struct to work both for immediately
provided metadata and metadata passed from the bootloader, we now have
a separate struct pbus_boot_metadata_t used for specifying bootloader
metadata to be assigned to a platform device.

ZX-2513 #in progress

TEST: booted VIM2, astro and gauss and verified that drivers that
use metadata started up successfully.

Change-Id: I7065fd497646f386987cb5dc317d1c66daa8df0a


# 0d71f953 21-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[dev][platform-bus] Clean-up and simplify platform bus protocol:

- Remove "flags" parameter from pbus_device_add().
Now platform devices can only be started in new devhosts.

- Add new API pbus_protocol_device_add(), for binding drivers that implement
platform bus protocols like GPIO and I2C_IMPL.
pbus_protocol_device_add() is equivalent to pbus_device_add(PDEV_ADD_PBUS_DEVHOST)
followed by pbus_wait_protocol().

- Remove pbus_wait_protocol(). pbus_protocol_device_add() does the wait for you automatically.

- Rename pbus_set_protocol() to pbus_register_protocol()

These changes will hopefully make the platform bus protocol easier
to understand and use.
I found two places where people accidentally using PDEV_ADD_PBUS_DEVHOST
inappropriately (probably copy & paste errors), which resulted in
the entire network stack and storage stack running in the platform bus devhost.
Hopefully this change will make it impossible for mistakes like that to happen again.

While doing this I also noticed that the gauss nand driver and vim2 ethernet driver
were running in the platform bus devhost. This change fixes that.

Also removed some remnants of the pbus_device_enable() API, which has been removed previously.

TEST: boot up on qemu, VIM2, gauss and astro and verified platform devices all start up properly

Change-Id: I580269bc6f53a63348ba8ab580259b1ba56dd393


# ce95ba85 07-Aug-2018 Suraj Malhotra <surajmalhotra@google.com>

[astro][gauss] Fix metadata size

Tested: Manually tested on gauss and astro.
Change-Id: I1eeca063f0d2d7f4a72c6d8f51443d60b711b60d


# 18d036ea 25-Jul-2018 Suraj Malhotra <surajmalhotra@google.com>

[astro][gauss][nandpart][skip-block] Add support for partition copies.

The bootloader (or TPL partition) for astro and gauss require that it be
written 4 times. To accomplish this, the partition is borken into 4 sub
partitions, at physical quarter boundries. From each sub-partition, a
skip-block write is performed.

This enables us to pave the bootloader. Another way to accomplish this
same behavior would be to modify the partition map to instead expose 4
skip-block partitions for the bootloader partition, and have the paver
manually write each copy in succession. This was avoided as it would
require device specific information embedded in it.

Reads will always read the first copy. We could expose the ability to
chose which copy of the partition gets read, or do some sort of smart
fallback for reading other copies of the partition for failed reads if
there is a good use case for it.

Change-Id: I08e30c7078e44fd7f957d4997bacc1fc213836af
Tested: Paved the bootloader.


# 8702591e 03-Jul-2018 Suraj Malhotra <surajmalhotra@google.com>

[astro][bad-block] Add bad-block metadata to astro.

Since this information is not available in the partition map, it is
added in the platform driver. The struct is meant to be generic enough
to allow for future bad block implementations to also store their
required information as necessary.

Change-Id: I9ce7218b8fcfb9db15344b2205d2c0bbbe848ccd
Tested: Manually tested with future changes.


# 350aac28 28-Jun-2018 Mike Voydanoff <voydanoff@google.com>

[ddk][platform-bus] Misc driver metadata cleanup

Rename "boot_metadata" to "metadata" in the plaform bus and device protocols,
since not all metadata provided by the platform bus comes from the bootloader.

Rename DEVICE_METADATA_DRIVER_DATA to DEVICE_METADATA_PRIVATE to clarify
that this signifies that the metadata type is local to a particular driver
or protocol.

Remove unused pbus_publish_boot_metadata() from platform bus protocol

Test: manual testing on VIM2

Change-Id: If969bb0005da7cb66901a796effc8231a8cb2ebe


# 66934350 19-Jun-2018 Mike Voydanoff <voydanoff@google.com>

[board][astro] Add partition map metadata to rawnand device

This will be used by upcoming NAND partition map driver

TEST: Booted astro with modified bootloader and WIP nand driver

Change-Id: Iaf0b0b8c34a914d33165b06bb9aba425f3c6d883


# 4cae5b1e 24-May-2018 Mohan Srinivasan <srmohan@google.com>

[astro] Astro board driver for Amlogic RAW_NAND.

Change-Id: Ic6d0c029dbbce2b52505de2de00081ffca20a304