Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83951
b: refs/heads/master
c: b74a7e5
h: refs/heads/master
i:
  83949: ccfdd8e
  83947: 044cf0a
  83943: eb7e1e9
  83935: 3af9764
v: v3
  • Loading branch information
Kim Phillips authored and Kumar Gala committed Feb 6, 2008
1 parent 109b818 commit 5c6d4a0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8353ec7b0d6666c0674ca978379c55234609dae8
refs/heads/master: b74a7e50cc87dea1b86d35860ace81412cb49886
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/boot/dts/mpc8315erdb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "simple-bus";
compatible = "fsl,mpc8315-immr", "simple-bus";
ranges = <0 0xe0000000 0x00100000>;
reg = <0xe0000000 0x00000200>;
bus-frequency = <0>;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/platforms/83xx/mpc83xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
#define MPC8315_SCCR_USB_MASK 0x00c00000
#define MPC8315_SCCR_USB_DRCM_11 0x00c00000
#define MPC837X_SCCR_USB_DRCM_11 0x00c00000

/* system i/o configuration register low */
Expand Down
17 changes: 13 additions & 4 deletions trunk/arch/powerpc/platforms/83xx/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ int mpc831x_usb_cfg(void)
u32 temp;
void __iomem *immap, *usb_regs;
struct device_node *np = NULL;
struct device_node *immr_node = NULL;
const void *prop;
struct resource res;
int ret = 0;
Expand All @@ -124,10 +125,15 @@ int mpc831x_usb_cfg(void)
}

/* Configure clock */
temp = in_be32(immap + MPC83XX_SCCR_OFFS);
temp &= ~MPC83XX_SCCR_USB_MASK;
temp |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
out_be32(immap + MPC83XX_SCCR_OFFS, temp);
immr_node = of_get_parent(np);
if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
MPC8315_SCCR_USB_MASK,
MPC8315_SCCR_USB_DRCM_11);
else
clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
MPC83XX_SCCR_USB_MASK,
MPC83XX_SCCR_USB_DRCM_11);

/* Configure pin mux for ULPI. There is no pin mux for UTMI */
if (prop && !strcmp(prop, "ulpi")) {
Expand All @@ -144,6 +150,9 @@ int mpc831x_usb_cfg(void)

iounmap(immap);

if (immr_node)
of_node_put(immr_node);

/* Map USB SOC space */
ret = of_address_to_resource(np, 0, &res);
if (ret) {
Expand Down

0 comments on commit 5c6d4a0

Please sign in to comment.