Skip to content

Commit

Permalink
Update USB Host EHCI_TT and OHCI drivers config files and documentati…
Browse files Browse the repository at this point in the history
…on (#31)
  • Loading branch information
MiloradCvjetkovic authored May 28, 2024
1 parent 0bf6d7d commit 55860a7
Show file tree
Hide file tree
Showing 14 changed files with 183 additions and 152 deletions.
3 changes: 2 additions & 1 deletion ARM.CMSIS-Driver.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@
<description>USB Host EHCI Controller Driver for customized EHCI with internal Transaction Translator (TT)</description>
<RTE_Components_h>
<!-- the following content goes into file 'RTE_Components.h' -->
#define RTE_Drivers_USBH_EHCI /* Driver USBH EHCI (TT) */
#define RTE_Drivers_USBH_EHCI /* Driver USBH EHCI */
#define RTE_Drivers_USBH_EHCI_TT /* Driver USBH EHCI (TT) */
</RTE_Components_h>
<files>
<file category="header" name="USB/EHCI/Interface/USBH_EHCI_HW.h"/>
Expand Down
36 changes: 18 additions & 18 deletions Documentation/Doxygen/src/introduction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ It is configured via define values in the <b>USBH_EHCI_Config.h</b> configuratio
<b>Configuration</b>

- <b>USB Host Controller 0</b>:
- <b>Driver number</b>: Specifies the exported Driver_USBH# instance
- <b>EHCI registers base address</b>: Specifies the absolute address at which EHCI controller registers are located
- <b>Relocated EHCI communication area</b>: Specifies if the communication area is located at a specific address (via the linker script)
- <b>EHCI communication area section name</b>: Specifies the section name of the EHCI communication area
- <b>Export control block Driver_USBH#</b>: Specifies the exported driver control block number.
- <b>EHCI Registers base address</b>: Specifies the absolute address at which EHCI controller registers are located.
- <b>Relocate EHCI Communication Area</b>: Specifies if the communication area is located at a specific address (via the linker script):
- <b>Section name</b>: Specifies the section name of the EHCI communication area (for positioning via the linker script).

- <b>USB Host Controller 1</b> (can be enabled/disabled):
- <b>Driver number</b>: Specifies the exported Driver_USBH# instance
- <b>EHCI registers base address</b>: Specifies the absolute address at which EHCI controller registers are located
- <b>Relocated EHCI communication area</b>: Specifies if the communication area is located at a specific address (via the linker script)
- <b>EHCI communication area section name</b>: Specifies the section name of the EHCI communication area
- <b>Export control block Driver_USBH#</b>: Specifies the exported driver control block number.
- <b>EHCI Registers base address</b>: Specifies the absolute address at which EHCI controller registers are located.
- <b>Relocate EHCI Communication Area</b>: Specifies if the communication area is located at a specific address (via the linker script):
- <b>Section name</b>: Specifies the section name of the EHCI communication area (for positioning via the linker script).

- <b>USBH_EHCI_MAX_PIPES</b>: Specifies maximum number of pipes that the driver will support (per controller)
- <b>Maximum number of Pipes (per controller)</b>: Specifies the maximum number of pipes that the driver will support (per controller).

\subsection driver_OHCI OHCI

Expand All @@ -226,18 +226,18 @@ It is configured via define values in the <b>USBH_OHCI_Config.h</b> configuratio
<b>Configuration</b>

- <b>USB Host Controller 0</b>:
- <b>Driver number</b>: Specifies the exported Driver_USBH# instance
- <b>OHCI registers base address</b>: Specifies the absolute address at which OHCI controller registers are located
- <b>Relocated OHCI communication area (HCCA)</b>: Specifies if the communication area is located at a specific address (via the linker script)
- <b>OHCI communication area section name</b>: Specifies the section name of the OHCI communication area
- <b>Export control block Driver_USBH#</b>: Specifies the exported driver control block number.
- <b>OHCI Registers base address</b>: Specifies the absolute address at which OHCI controller registers are located.
- <b>Relocate OHCI Communication Area (HCCA)</b>: Specifies if the communication area is located at a specific address (via the linker script):
- <b>Section name</b>: Specifies the section name of the OHCI communication area (for positioning via the linker script).

- <b>USB Host Controller 1</b> (can be enabled/disabled):
- <b>Driver number</b>: Specifies the exported Driver_USBH# instance
- <b>OHCI registers base address</b>: Specifies the absolute address at which OHCI controller registers are located
- <b>Relocated OHCI communication area (HCCA)</b>: Specifies if the communication area is located at a specific address (via the linker script)
- <b>OHCI communication area section name</b>: Specifies the section name of the OHCI communication area
- <b>Export control block Driver_USBH#</b>: Specifies the exported driver control block number.
- <b>OHCI Registers base address</b>: Specifies the absolute address at which OHCI controller registers are located.
- <b>Relocate OHCI Communication Area (HCCA)</b>: Specifies if the communication area is located at a specific address (via the linker script):
- <b>Section name</b>: Specifies the section name of the OHCI communication area (for positioning via the linker script).

- <b>USBH_OHCI_MAX_PIPES</b>: Specifies maximum number of pipes that the driver will support (per controller)
- <b>Maximum number of Pipes (per controller)</b>: Specifies the maximum number of pipes that the driver will support (per controller).
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
Expand Down
51 changes: 28 additions & 23 deletions USB/EHCI/Config/USBH_EHCI_Config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,64 +15,70 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 16. May 2024
* $Revision: V1.0
* $Date: 27. May 2024
* $Revision: V1.0
*
* Project: Config file for USB Host EHCI Controller Driver
* -------------------------------------------------------------------------- */
* Project: USB Host EHCI Controller Driver Configuration definitions
*
* -----------------------------------------------------------------------------
*/

//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------

#ifndef USBH_EHCI_CONFIG_H_
#define USBH_EHCI_CONFIG_H_

// <h>USB Host Controller 0
// <o>Driver number <0-3>
// <i>Specifies the exported Driver_USBH# instance
// <i>For example for value 0 the exported driver will be Driver_USBH0
// <o>Export control block Driver_USBH# <0-255>
// <i>Specifies the exported driver control block number
// <i>For example, for value 0 the exported driver control block will be Driver_USBH0
#define USBH0_EHCI_DRV_NUM 0

// <o>EHCI registers base address <0-0xFFFFFFFF>
// <o>EHCI Registers base address <0-0xFFFFFFFF>
// <i>Specifies the absolute address at which EHCI controller registers are located
#define USBH0_EHCI_BASE_ADDR 0x402E0100

// <e>Relocated EHCI communication area
// <e>Relocate EHCI Communication Area
// <i>Specifies if the communication area is located at a specific address
// <i>(via the linker script).
// <i>(via the linker script)
#define USBH0_EHCI_COM_AREA_RELOC 0

// <s.64>EHCI communication area section name
// <s.64>Section name
// <i>Specifies the section name of the EHCI communication area
// <i>(for positioning via the linker script)
#define USBH0_EHCI_COM_AREA_SECTION_NAME ".driver.usbh0.ehci_com_area"
// </e>
// </h>

// <e>USB Host Controller 1
// <i>Enables or disables USB Host Driver 1
// <i>Enables or disables USB Host Controller 1 Driver
#define USBH1_EHCI_ENABLED 0

// <o>Driver number <0-3>
// <i>Specifies the exported Driver_USBH# instance
// <i>For example for value 1 the exported driver will be Driver_USBH1
// <o>Export control block Driver_USBH# <0-255>
// <i>Specifies the exported driver control block number
// <i>For example, for value 1 the exported driver control block will be Driver_USBH1
#define USBH1_EHCI_DRV_NUM 1

// <o>EHCI Host Controller registers base address <0-0xFFFFFFFF>
// <o>EHCI Registers base address <0-0xFFFFFFFF>
// <i>Specifies the absolute address at which EHCI controller registers are located
#define USBH1_EHCI_BASE_ADDR 0x402E0300

// <e>Relocated EHCI communication area
// <e>Relocate EHCI Communication Area
// <i>Specifies if the communication area is located at a specific address
// <i>(via the linker script).
// <i>(via the linker script)
#define USBH1_EHCI_COM_AREA_RELOC 0

// <s.64>EHCI communication area section name
// <s.64>Section name
// <i>Specifies the section name of the EHCI communication area
// <i>(for positioning via the linker script)
#define USBH1_EHCI_COM_AREA_SECTION_NAME ".driver.usbh1.ehci_com_area"
// </e>
// </e>

// <o>Maximum number of pipes (per controller) <1-15>
// <o>Maximum number of Pipes <1-15>
// <i>Specifies the maximum number of pipes that the driver will support (per controller)
#define USBH_EHCI_MAX_PIPES 4

#endif /* USBH_EHCI_CONFIG_H_ */
28 changes: 15 additions & 13 deletions USB/EHCI/Interface/USBH_EHCI_HW.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,22 +15,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 15. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Hardware-specific Driver header
* -------------------------------------------------------------------------- */
* $Date: 28. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Driver Hardware-specific header
*
* -----------------------------------------------------------------------------
*/

#ifndef USBH_EHCI_HW_H_
#define USBH_EHCI_HW_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include <stdint.h>

#ifdef __cplusplus
extern "C"
{
#endif

typedef void (*USBH_EHCI_Interrupt_t) (void); ///< Pointer to EHCI Interrupt Handler Routine.

Expand Down
20 changes: 11 additions & 9 deletions USB/EHCI/Source/USBH_EHCI_TT.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,14 +15,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 16. May 2024
* $Revision: V1.0
* $Date: 28. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Driver
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
* -------------------------------------------------------------------------- */
* Project: USB Host EHCI Controller Driver
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
*
* -----------------------------------------------------------------------------
*/

/* History:
* Version 1.0
Expand Down
20 changes: 11 additions & 9 deletions USB/EHCI/Source/USBH_EHCI_TT.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,14 +15,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 15. May 2024
* $Revision: V1.0
* $Date: 28. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Driver header
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
* -------------------------------------------------------------------------- */
* Project: USB Host EHCI Controller Driver header
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
*
* -----------------------------------------------------------------------------
*/

#ifndef USBH_EHCI_TT_H_
#define USBH_EHCI_TT_H_
Expand Down
20 changes: 11 additions & 9 deletions USB/EHCI/Source/USBH_EHCI_TT_Regs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,14 +15,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 15. May 2024
* $Revision: V1.0
* $Date: 28. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Driver Registers header
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
* -------------------------------------------------------------------------- */
* Project: USB Host EHCI Controller Driver Registers header
* for customized EHCI with internal Transaction Translator (TT)
* (with full/low speed support)
*
* -----------------------------------------------------------------------------
*/

#ifndef USBH_EHCI_TT_REGS_H_
#define USBH_EHCI_TT_REGS_H_
Expand Down
16 changes: 9 additions & 7 deletions USB/EHCI/Template/USBH_EHCI_HW.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* -----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited (or its affiliates).
* All rights reserved.
/*
* Copyright (c) 2024 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -16,12 +15,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Date: 15. May 2024
* $Revision: V1.0
* $Date: 28. May 2024
* $Revision: V1.0
*
* Project: USB Host EHCI Controller Hardware-specific Driver template
* -------------------------------------------------------------------------- */
* Project: USB Host EHCI Controller Driver Hardware-specific template
*
* -----------------------------------------------------------------------------
*/

#include "USBH_EHCI_HW.h"

Expand Down
Loading

0 comments on commit 55860a7

Please sign in to comment.