Commit 1d1e4e1b authored by mux's avatar mux
Browse files

Fix USB CORE PCGCCTL Wrong Address

* Fix PCGCCTL bug using address instead of value.
* Fix issue #211
parent 638179fb
...@@ -1961,7 +1961,7 @@ void USB_OTG_ActiveRemoteWakeup(USB_OTG_CORE_HANDLE *pdev) ...@@ -1961,7 +1961,7 @@ void USB_OTG_ActiveRemoteWakeup(USB_OTG_CORE_HANDLE *pdev)
if(pdev->cfg.low_power) if(pdev->cfg.low_power)
{ {
/* un-gate USB Core clock */ /* un-gate USB Core clock */
power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong... power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0; power.b.gatehclk = 0;
power.b.stoppclk = 0; power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32); USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
...@@ -1995,7 +1995,7 @@ void USB_OTG_UngateClock(USB_OTG_CORE_HANDLE *pdev) ...@@ -1995,7 +1995,7 @@ void USB_OTG_UngateClock(USB_OTG_CORE_HANDLE *pdev)
if(dsts.b.suspsts == 1) if(dsts.b.suspsts == 1)
{ {
/* un-gate USB Core clock */ /* un-gate USB Core clock */
power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong... power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0; power.b.gatehclk = 0;
power.b.stoppclk = 0; power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32); USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
......
...@@ -352,7 +352,7 @@ static uint32_t DCD_HandleResume_ISR(USB_OTG_CORE_HANDLE *pdev) ...@@ -352,7 +352,7 @@ static uint32_t DCD_HandleResume_ISR(USB_OTG_CORE_HANDLE *pdev)
if(pdev->cfg.low_power) if(pdev->cfg.low_power)
{ {
/* un-gate USB Core clock */ /* un-gate USB Core clock */
power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong... power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0; power.b.gatehclk = 0;
power.b.stoppclk = 0; power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32); USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment