Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d555a1a1
Commit
d555a1a1
authored
May 05, 2015
by
Thierry Reding
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-4.2/ramcode' into for-4.2/emc
parents
b787f68c
6ea2609a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
...ation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
+2
-0
drivers/soc/tegra/fuse/tegra-apbmisc.c
drivers/soc/tegra/fuse/tegra-apbmisc.c
+21
-0
include/soc/tegra/fuse.h
include/soc/tegra/fuse.h
+1
-0
No files found.
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
View file @
d555a1a1
...
@@ -10,3 +10,5 @@ Required properties:
...
@@ -10,3 +10,5 @@ Required properties:
The second entry gives the physical address and length of the
The second entry gives the physical address and length of the
registers indicating the strapping options.
registers indicating the strapping options.
Optional properties:
- nvidia,long-ram-code: If present, the RAM code is long (4 bit). If not, short (2 bit).
drivers/soc/tegra/fuse/tegra-apbmisc.c
View file @
d555a1a1
...
@@ -28,8 +28,15 @@
...
@@ -28,8 +28,15 @@
#define APBMISC_SIZE 0x64
#define APBMISC_SIZE 0x64
#define FUSE_SKU_INFO 0x10
#define FUSE_SKU_INFO 0x10
#define PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT 4
#define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_LONG \
(0xf << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT)
#define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT \
(0x3 << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT)
static
void
__iomem
*
apbmisc_base
;
static
void
__iomem
*
apbmisc_base
;
static
void
__iomem
*
strapping_base
;
static
void
__iomem
*
strapping_base
;
static
bool
long_ram_code
;
u32
tegra_read_chipid
(
void
)
u32
tegra_read_chipid
(
void
)
{
{
...
@@ -54,6 +61,18 @@ u32 tegra_read_straps(void)
...
@@ -54,6 +61,18 @@ u32 tegra_read_straps(void)
return
0
;
return
0
;
}
}
u32
tegra_read_ram_code
(
void
)
{
u32
straps
=
tegra_read_straps
();
if
(
long_ram_code
)
straps
&=
PMC_STRAPPING_OPT_A_RAM_CODE_MASK_LONG
;
else
straps
&=
PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT
;
return
straps
>>
PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT
;
}
static
const
struct
of_device_id
apbmisc_match
[]
__initconst
=
{
static
const
struct
of_device_id
apbmisc_match
[]
__initconst
=
{
{
.
compatible
=
"nvidia,tegra20-apbmisc"
,
},
{
.
compatible
=
"nvidia,tegra20-apbmisc"
,
},
{},
{},
...
@@ -112,4 +131,6 @@ void __init tegra_init_apbmisc(void)
...
@@ -112,4 +131,6 @@ void __init tegra_init_apbmisc(void)
strapping_base
=
of_iomap
(
np
,
1
);
strapping_base
=
of_iomap
(
np
,
1
);
if
(
!
strapping_base
)
if
(
!
strapping_base
)
pr_err
(
"ioremap tegra strapping_base failed
\n
"
);
pr_err
(
"ioremap tegra strapping_base failed
\n
"
);
long_ram_code
=
of_property_read_bool
(
np
,
"nvidia,long-ram-code"
);
}
}
include/soc/tegra/fuse.h
View file @
d555a1a1
...
@@ -56,6 +56,7 @@ struct tegra_sku_info {
...
@@ -56,6 +56,7 @@ struct tegra_sku_info {
};
};
u32
tegra_read_straps
(
void
);
u32
tegra_read_straps
(
void
);
u32
tegra_read_ram_code
(
void
);
u32
tegra_read_chipid
(
void
);
u32
tegra_read_chipid
(
void
);
int
tegra_fuse_readl
(
unsigned
long
offset
,
u32
*
value
);
int
tegra_fuse_readl
(
unsigned
long
offset
,
u32
*
value
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment