@@ -119,20 +119,20 @@ enum vc3_div {
119
119
};
120
120
121
121
enum vc3_clk_mux {
122
- VC3_DIFF2_MUX ,
123
- VC3_DIFF1_MUX ,
124
- VC3_SE3_MUX ,
125
- VC3_SE2_MUX ,
126
122
VC3_SE1_MUX ,
123
+ VC3_SE2_MUX ,
124
+ VC3_SE3_MUX ,
125
+ VC3_DIFF1_MUX ,
126
+ VC3_DIFF2_MUX ,
127
127
};
128
128
129
129
enum vc3_clk {
130
- VC3_DIFF2 ,
131
- VC3_DIFF1 ,
132
- VC3_SE3 ,
133
- VC3_SE2 ,
134
- VC3_SE1 ,
135
130
VC3_REF ,
131
+ VC3_SE1 ,
132
+ VC3_SE2 ,
133
+ VC3_SE3 ,
134
+ VC3_DIFF1 ,
135
+ VC3_DIFF2 ,
136
136
};
137
137
138
138
struct vc3_clk_data {
@@ -896,33 +896,33 @@ static struct vc3_hw_data clk_div[] = {
896
896
};
897
897
898
898
static struct vc3_hw_data clk_mux [] = {
899
- [VC3_DIFF2_MUX ] = {
899
+ [VC3_SE1_MUX ] = {
900
900
.data = & (struct vc3_clk_data ) {
901
- .offs = VC3_DIFF2_CTRL_REG ,
902
- .bitmsk = VC3_DIFF2_CTRL_REG_DIFF2_CLK_SEL
901
+ .offs = VC3_SE1_DIV4_CTRL ,
902
+ .bitmsk = VC3_SE1_DIV4_CTRL_SE1_CLK_SEL
903
903
},
904
904
.hw .init = & (struct clk_init_data ){
905
- .name = "diff2_mux " ,
905
+ .name = "se1_mux " ,
906
906
.ops = & vc3_clk_mux_ops ,
907
907
.parent_hws = (const struct clk_hw * []) {
908
- & clk_div [VC3_DIV1 ].hw ,
909
- & clk_div [VC3_DIV3 ].hw
908
+ & clk_div [VC3_DIV5 ].hw ,
909
+ & clk_div [VC3_DIV4 ].hw
910
910
},
911
911
.num_parents = 2 ,
912
912
.flags = CLK_SET_RATE_PARENT
913
913
}
914
914
},
915
- [VC3_DIFF1_MUX ] = {
915
+ [VC3_SE2_MUX ] = {
916
916
.data = & (struct vc3_clk_data ) {
917
- .offs = VC3_DIFF1_CTRL_REG ,
918
- .bitmsk = VC3_DIFF1_CTRL_REG_DIFF1_CLK_SEL
917
+ .offs = VC3_SE2_CTRL_REG0 ,
918
+ .bitmsk = VC3_SE2_CTRL_REG0_SE2_CLK_SEL
919
919
},
920
920
.hw .init = & (struct clk_init_data ){
921
- .name = "diff1_mux " ,
921
+ .name = "se2_mux " ,
922
922
.ops = & vc3_clk_mux_ops ,
923
923
.parent_hws = (const struct clk_hw * []) {
924
- & clk_div [VC3_DIV1 ].hw ,
925
- & clk_div [VC3_DIV3 ].hw
924
+ & clk_div [VC3_DIV5 ].hw ,
925
+ & clk_div [VC3_DIV4 ].hw
926
926
},
927
927
.num_parents = 2 ,
928
928
.flags = CLK_SET_RATE_PARENT
@@ -944,33 +944,33 @@ static struct vc3_hw_data clk_mux[] = {
944
944
.flags = CLK_SET_RATE_PARENT
945
945
}
946
946
},
947
- [VC3_SE2_MUX ] = {
947
+ [VC3_DIFF1_MUX ] = {
948
948
.data = & (struct vc3_clk_data ) {
949
- .offs = VC3_SE2_CTRL_REG0 ,
950
- .bitmsk = VC3_SE2_CTRL_REG0_SE2_CLK_SEL
949
+ .offs = VC3_DIFF1_CTRL_REG ,
950
+ .bitmsk = VC3_DIFF1_CTRL_REG_DIFF1_CLK_SEL
951
951
},
952
952
.hw .init = & (struct clk_init_data ){
953
- .name = "se2_mux " ,
953
+ .name = "diff1_mux " ,
954
954
.ops = & vc3_clk_mux_ops ,
955
955
.parent_hws = (const struct clk_hw * []) {
956
- & clk_div [VC3_DIV5 ].hw ,
957
- & clk_div [VC3_DIV4 ].hw
956
+ & clk_div [VC3_DIV1 ].hw ,
957
+ & clk_div [VC3_DIV3 ].hw
958
958
},
959
959
.num_parents = 2 ,
960
960
.flags = CLK_SET_RATE_PARENT
961
961
}
962
962
},
963
- [VC3_SE1_MUX ] = {
963
+ [VC3_DIFF2_MUX ] = {
964
964
.data = & (struct vc3_clk_data ) {
965
- .offs = VC3_SE1_DIV4_CTRL ,
966
- .bitmsk = VC3_SE1_DIV4_CTRL_SE1_CLK_SEL
965
+ .offs = VC3_DIFF2_CTRL_REG ,
966
+ .bitmsk = VC3_DIFF2_CTRL_REG_DIFF2_CLK_SEL
967
967
},
968
968
.hw .init = & (struct clk_init_data ){
969
- .name = "se1_mux " ,
969
+ .name = "diff2_mux " ,
970
970
.ops = & vc3_clk_mux_ops ,
971
971
.parent_hws = (const struct clk_hw * []) {
972
- & clk_div [VC3_DIV5 ].hw ,
973
- & clk_div [VC3_DIV4 ].hw
972
+ & clk_div [VC3_DIV1 ].hw ,
973
+ & clk_div [VC3_DIV3 ].hw
974
974
},
975
975
.num_parents = 2 ,
976
976
.flags = CLK_SET_RATE_PARENT
@@ -1109,7 +1109,7 @@ static int vc3_probe(struct i2c_client *client)
1109
1109
name , 0 , CLK_SET_RATE_PARENT , 1 , 1 );
1110
1110
else
1111
1111
clk_out [i ] = devm_clk_hw_register_fixed_factor_parent_hw (dev ,
1112
- name , & clk_mux [i ].hw , CLK_SET_RATE_PARENT , 1 , 1 );
1112
+ name , & clk_mux [i - 1 ].hw , CLK_SET_RATE_PARENT , 1 , 1 );
1113
1113
1114
1114
if (IS_ERR (clk_out [i ]))
1115
1115
return PTR_ERR (clk_out [i ]);
0 commit comments